//
// Attack Ship
//

#include "stagesetup.h"

// Characters
#define CHR_ELVIS            0x00
#define CHR_KNIFEABLE_SKEDAR 0x01
#define CHR_SUSPENDEDANIM1   0x0d
#define CHR_SUSPENDEDANIM2   0x0e
#define CHR_SUSPENDEDANIM3   0x0f
#define CHR_SUSPENDEDANIM4   0x10
#define CHR_BRIDGE1          0x25
#define CHR_BRIDGE2          0x26
#define CHR_BRIDGE3          0x2d
#define CHR_MAIAN1           0x2e
#define CHR_MAIAN2           0x2f
#define CHR_MAIAN3           0x30
#define CHR_BRIDGESPAWNER1   0x31
#define CHR_BRIDGESPAWNER2   0x32
#define CHR_CASS             0x33
#define CHR_INTRO_SKEDAR     0x34
#define CHR_SHY_SKEDAR       0x35 // hides behind the lift at the start

// Objects
#define OBJ_HANGARDOOR1       0x00
#define OBJ_HANGARDOOR2       0x01
#define OBJ_HANGARDOOR3       0x02
#define OBJ_HANGARDOOR4       0x03
#define OBJ_SHIELDCONSOLE1    0x04
#define OBJ_SHIELDCONSOLE2    0x05
#define OBJ_SHIELDCONSOLE3    0x06
#define OBJ_HANGARDOORCONSOLE 0x09
#define OBJ_HANGARLIFT_ELVIS  0x0c
#define OBJ_HANGARLIFT_JO     0x0e
#define OBJ_AR34              0x18
#define OBJ_ENGINE1           0x19
#define OBJ_ENGINE2           0x1a
#define OBJ_PREBRIDGELIFT     0x22
#define OBJ_BRIDGELIFT        0x23
#define OBJ_HANGAR_SHUTTLE    0x2c
#define OBJ_MAULER1           0x43
#define OBJ_MAULER2           0x44
#define OBJ_OUTRO_SHUTTLE     0x45
#define OBJ_NECKLACE          0x4a

// Stage flags
#define STAGEFLAG_ENTERED_BRIDGELIFT              0x00000001
#define STAGEFLAG_SAID_LOOKOUT                    0x00000002
#define STAGEFLAG_SHIELDS_DISABLED                0x00000100
#define STAGEFLAG_HANGAR_DOORS_OPEN               0x00000200
#define STAGEFLAG_NAVIGATION_ROOM_DONE            0x00000400
#define STAGEFLAG_ELVIS_DEAD                      0x00000800
#define STAGEFLAG_ENTERED_SLAYER_AREA             0x00001000
#define STAGEFLAG_TRIGGER_HANGAR_MAIANS           0x00002000
#define STAGEFLAG_HANGAR_ALARM_ACTIVATED          0x00004000
#define STAGEFLAG_HANGAR_KILLS_DONE               0x00008000
#define STAGEFLAG_ENGINES_DESTROYED               0x00010000
#define STAGEFLAG_ENTERED_BRIDGE                  0x00020000
#define STAGEFLAG_ELVIS_COMING_TO_BRIDGE          0x00040000
#define STAGEFLAG_TRIGGER_BRIDGE_SPAWNING         0x00080000
#define STAGEFLAG_BRIDGE_CAPTURED                 0x00100000
#define STAGEFLAG_SAID_GETSHIELDSDOWN             0x00200000
#define STAGEFLAG_INTRO_FINISHED                  0x00400000
#define STAGEFLAG_CASS_AT_PAD                     0x00800000
#define STAGEFLAG_SHY_SKEDAR_READY                0x01000000
#define STAGEFLAG_02000000                        0x02000000
#define STAGEFLAG_SAID_GO_ON_AHEAD                0x04000000
#define STAGEFLAG_HANGAR_DOOR_CONSOLE_DESTROYED   0x08000000
#define STAGEFLAG_MET_ELVIS                       0x10000000
#define STAGEFLAG_AMMO_WASTED                     0x20000000
#define STAGEFLAG_CASS_SCREAMING                  0x40000000
#define STAGEFLAG_BRIDGE_DOORS_UNLOCKED           0x80000000

// AI Lists
#define AILIST_INIT_KNIFEABLE_SKEDAR            0x0407
#define AILIST_KNIFEABLE_SKEDAR                 0x0408
#define AILIST_ELVIS_FOLLOW                     0x0409
#define AILIST_ELVIS_GO_TO_HANGAR_LIFT          0x040a
#define AILIST_INIT_CASS                        0x040b
#define AILIST_ELVIS_RUN_FROM_ENGINEROOM        0x040c
#define AILIST_ELVIS_WAIT_FOR_HANGAR_ENTRY      0x040d
#define AILIST_ELVIS_GIVE_AR34                  0x040e
#define AILIST_INIT_SKEDAR                      0x040f
#define AILIST_WAKE_SUSPENDEDANIM_SKEDAR        0x0410
#define AILIST_HANGARSPAWNER                    0x0412
#define AILIST_INIT_HANGARCLONE                 0x0413
#define AILIST_HANGARCLONE                      0x0414
#define AILIST_INIT_BRIDGECLONE                 0x0416
#define AILIST_INIT_BRIDGESPAWNER_REVEAL        0x0417
#define AILIST_INIT_HANGAR_MAIAN                0x0418
#define AILIST_HANGAR_MAIAN                     0x0419
#define AILIST_BRIDGECLONE                      0x041a
#define AILIST_ELVIS_AT_BRIDGE                  0x041b
#define AILIST_ELVIS_OUTSIDE_PREBRIDGELIFT      0x041c
#define AILIST_INIT_ELVIS_OUTSIDE_PREBRIDGELIFT 0x041d
#define AILIST_INIT_BRIDGE1AND2                 0x041e
#define AILIST_CLOAK_AND_REMOVE                 0x041f
#define AILIST_INIT_BRIDGE3                     0x0420
#define AILIST_BRIDGE_SKEDAR                    0x0421
#define AILIST_CASS                             0x0422
#define AILIST_SHY_SKEDAR                       0x0423
#define AILIST_SHY_SKEDAR_WAIT                  0x0424
#define AILIST_INIT_SHY_SKEDAR                  0x0425
#define AILIST_OUTRO                            0x0426
#define AILIST_SET_CLOAKED                      0x0427
#define AILIST_SET_UNCLOAKED                    0x0428

enum labelnum {
	LABEL_60 = (VERSION >= VERSION_NTSC_1_0 ? 0x60 : 0x5f),
	LABEL_61,
	LABEL_62,
	LABEL_63,
	LABEL_64,
	LABEL_65,
	LABEL_66,
	LABEL_67,
	LABEL_68,
	LABEL_69,
	LABEL_6A,
	LABEL_6B,
#if VERSION >= VERSION_NTSC_1_0
	LABEL_6C,
#endif
	LABEL_6D,
	LABEL_6E,
	LABEL_6F,
	LABEL_70,
	LABEL_71,
	LABEL_72,
	LABEL_73,
	LABEL_74,
	LABEL_75,
	LABEL_76,
	LABEL_77,
	LABEL_78,
	LABEL_79,
	LABEL_7A,
	LABEL_7B,
	LABEL_7C,
	LABEL_7D,
	LABEL_7E,
	LABEL_7F,
	LABEL_80,
	LABEL_81,
	LABEL_82,
	LABEL_83,
	LABEL_84,
	LABEL_85,
	LABEL_86,
	LABEL_87,
	LABEL_88,
	LABEL_89,
	LABEL_8A,
	LABEL_8B,
	LABEL_8C,
	LABEL_8D,
	LABEL_8E,
	LABEL_8F,
	LABEL_90,
	LABEL_91,
	LABEL_92,
	LABEL_93,
	LABEL_94,
	LABEL_95,
	LABEL_96,
	LABEL_97,
	LABEL_98,
	LABEL_99,
	LABEL_9A,
	LABEL_9B,
	LABEL_9C,
	LABEL_9D,
	LABEL_9E,
	LABEL_9F,
	LABEL_A0,
	LABEL_A1,
	LABEL_A2,
	LABEL_A3,
	LABEL_A4,
	LABEL_A5,
	LABEL_A6,
	LABEL_A7,
	LABEL_A8,
	LABEL_A9,
	LABEL_AA,
	LABEL_AB,
	LABEL_AC,
	LABEL_AD,
	LABEL_AE,
	LABEL_AF,
	LABEL_B0,
	LABEL_B1,
	LABEL_B2,
	LABEL_B3,
	LABEL_B4,
	LABEL_B5,
	LABEL_B6,
	LABEL_B7,
	LABEL_B8,
	LABEL_B9,
	LABEL_BA,
	LABEL_BB,
	LABEL_BC,
	LABEL_BD,
	LABEL_BE,
	LABEL_BF,
	LABEL_C0,
	LABEL_C1,
	LABEL_C2,
	LABEL_C3,
	LABEL_C4,
	LABEL_C5,
	LABEL_C6,
	LABEL_C7,
	LABEL_C8,
	LABEL_C9,
	LABEL_CA,
	LABEL_CB,
	LABEL_CC,
	LABEL_CD,
	LABEL_CE,
	LABEL_CF,
	LABEL_D0,
	LABEL_D1
};

#if VERSION < VERSION_NTSC_1_0
#define LABEL_6C LABEL_6D
#endif

extern s32 intro[];
extern u32 props[];
extern struct path paths[];
extern struct ailist ailists[];

struct stagesetup setup = {
	NULL,
	NULL,
	NULL,
	intro,
	props,
	paths,
	ailists,
	NULL,
};

u32 props[] = {
	briefing(BRIEFINGTYPE_LOCATION, L_LEE_001)
	briefing(BRIEFINGTYPE_TEXT_PA,  L_LEE_000)
	briefing(BRIEFINGTYPE_TEXT_SA,  L_LEE_002)
	briefing(BRIEFINGTYPE_TEXT_A,   L_LEE_003)

	beginobjective(0, L_LEE_005, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Disable shield system"
		complete_flags(STAGEFLAG_SHIELDS_DISABLED)
		fail_flags(STAGEFLAG_AMMO_WASTED)
	endobjective

	beginobjective(1, L_LEE_006, (DIFFBIT_PA | DIFFBIT_PD)) // "Open hangar doors"
		complete_flags(STAGEFLAG_HANGAR_DOORS_OPEN)
		fail_flags(STAGEFLAG_HANGAR_DOOR_CONSOLE_DESTROYED)
	endobjective

	beginobjective(2, L_LEE_007, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Access navigational systems"
		complete_flags(STAGEFLAG_NAVIGATION_ROOM_DONE)
		fail_flags(STAGEFLAG_ELVIS_DEAD)
	endobjective

	beginobjective(3, L_LEE_008, (DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Sabotage engine systems"
		complete_flags(STAGEFLAG_ENGINES_DESTROYED)
	endobjective

	beginobjective(4, L_LEE_009, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Gain control of bridge"
		complete_flags(STAGEFLAG_BRIDGE_CAPTURED)
	endobjective

	tag(0x2f, 5)
	tag(0x30, 5)
	tag(0x25, 2)
	tag(0x23, 1)
	lift(0x0100, MODEL_SK_LIFT, PAD_LEE_018C, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x018c, 0x018d, -1, -1, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00008000, 0x000a0000, 0x1f000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0180, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0181, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-2, -3, 0)
	lift_door(-2, -4, 0)
	chr(SPAWNFLAG_BASICGUARD, 0x01, PAD_LEE_01CF, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_KNIFEABLE_SKEDAR, -1, -1, 1000, 8, 0, CHRFLAG1_ADJUSTPUNCHSPEED, TEAM_ENEMY, SQUADRON_00, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0001, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x35, PAD_LEE_00E8, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SHY_SKEDAR, -1, -1, 1000, 6, CHRFLAG0_SKIPSAFETYCHECKS, CHRFLAG1_ADJUSTPUNCHSPEED, TEAM_ENEMY, SQUADRON_00, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0035, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x05, PAD_LEE_01CD, BODY_SKEDAR, HEAD_RANDOM, 0x0401, -1, -1, 100, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 2, 0, 4, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0005, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x06, PAD_LEE_01CE, BODY_SKEDAR, HEAD_RANDOM, 0x0402, -1, -1, 100, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 2, 0, 4, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0006, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x07, PAD_LEE_00B1, BODY_SKEDAR, HEAD_RANDOM, AILIST_HANGARSPAWNER, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, CHRFLAG1_ALLOWSOFTCOVER, TEAM_ENEMY, SQUADRON_02, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0007, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x08, PAD_LEE_00AE, BODY_SKEDAR, HEAD_RANDOM, AILIST_HANGARSPAWNER, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS, 0, TEAM_ENEMY, SQUADRON_02, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0008, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x09, PAD_LEE_01D0, BODY_SKEDAR, HEAD_RANDOM, AILIST_HANGARSPAWNER, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_02, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0009, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x0a, PAD_LEE_010D, BODY_SKEDAR, HEAD_RANDOM, AILIST_HANGARSPAWNER, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS, 0, TEAM_ENEMY, SQUADRON_02, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x000a, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BLUESIGHT, 0x2e, PAD_LEE_01D8, BODY_ELVIS1, HEAD_MAIAN_S, AILIST_INIT_HANGAR_MAIAN, 0x00b4, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS, CHRFLAG1_ALLOWSOFTCOVER | CHRFLAG1_AIVSAI_ADVANTAGED | CHRFLAG1_NOOP_00200000 | CHRFLAG1_IGNORECOVER, TEAM_ALLY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAIANSMG, 0x002e, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_CALLISTO)
	chr(SPAWNFLAG_BLUESIGHT, 0x2f, PAD_LEE_01D9, BODY_ELVIS1, HEAD_MAIAN_S, AILIST_INIT_HANGAR_MAIAN, 0x00b4, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS, CHRFLAG1_ALLOWSOFTCOVER | CHRFLAG1_AIVSAI_ADVANTAGED | CHRFLAG1_NOOP_00200000 | CHRFLAG1_IGNORECOVER, TEAM_ALLY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAIANSMG, 0x002f, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_CALLISTO)
	chr(SPAWNFLAG_IGNORECOLLISION | SPAWNFLAG_BLUESIGHT, 0x30, PAD_LEE_01F5, BODY_ELVIS1, HEAD_MAIAN_S, GAILIST_IDLE, 0x00b4, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS, CHRFLAG1_ALLOWSOFTCOVER | CHRFLAG1_AIVSAI_ADVANTAGED | CHRFLAG1_NOOP_00200000 | CHRFLAG1_IGNORECOVER, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	chr(SPAWNFLAG_ANTINONINTERACTABLE | SPAWNFLAG_BLUESIGHT, 0x00, PAD_LEE_00FE, BODY_ELVISWAISTCOAT, HEAD_ELVIS, AILIST_ELVIS_WAIT_FOR_HANGAR_ENTRY, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS, CHRFLAG1_ALLOWSOFTCOVER | CHRFLAG1_AIVSAI_ADVANTAGED | CHRFLAG1_NOOP_00200000 | CHRFLAG1_PUNCHHARDER, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAIANPISTOL, 0x0000, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_PHOENIX)
	weapon(0x0100, MODEL_CHRMAIANPISTOL, 0x0000, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_PHOENIX)
	link_guns(-1, -2)
	weapon(0x0100, MODEL_CHRPCGUN, PAD_LEE_001D, 0, 0, 0, WEAPON_AR34)
	tag(0x18, -1)
	chr(SPAWNFLAG_ONLYONPA, 0x02, PAD_LEE_00D6, BODY_SKEDAR, HEAD_RANDOM, GAILIST_IDLE_0009, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS, 0, TEAM_ENEMY, SQUADRON_03, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0002, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_ONLYONPA, 0x37, PAD_LEE_00D0, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_03, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0037, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x0b, PAD_LEE_0020, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_04, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x000b, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x0c, PAD_LEE_001F, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_04, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x000c, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x0d, PAD_LEE_004B, BODY_SKEDAR, HEAD_RANDOM, GAILIST_IDLE, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_NONCOMBAT, SQUADRON_05, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x000d, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x0e, PAD_LEE_004C, BODY_SKEDAR, HEAD_RANDOM, GAILIST_IDLE, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_NONCOMBAT, SQUADRON_05, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x000e, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x0f, PAD_LEE_004D, BODY_SKEDAR, HEAD_RANDOM, GAILIST_IDLE, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_NONCOMBAT, SQUADRON_05, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x000f, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x10, PAD_LEE_004E, BODY_SKEDAR, HEAD_RANDOM, GAILIST_IDLE, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_NONCOMBAT, SQUADRON_05, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0010, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x11, PAD_LEE_0028, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_06, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0011, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x12, PAD_LEE_0044, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_06, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0012, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x13, PAD_LEE_0039, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_06, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0013, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x14, PAD_LEE_0035, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0014, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x15, PAD_LEE_0036, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0015, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x16, PAD_LEE_0052, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0016, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x17, PAD_LEE_0051, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0017, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x18, PAD_LEE_0053, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0018, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x19, PAD_LEE_0054, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_08, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0019, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x1a, PAD_LEE_01DB, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_09, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x001a, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x1b, PAD_LEE_005E, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_09, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x001b, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x1c, PAD_LEE_0059, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x001c, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x1d, PAD_LEE_0056, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0A, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x001d, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x1e, PAD_LEE_005F, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0B, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x001e, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x1f, PAD_LEE_0055, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0B, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x001f, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x20, PAD_LEE_0060, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0B, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0020, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x21, PAD_LEE_0068, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0C, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0021, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x22, PAD_LEE_0069, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0C, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0022, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x25, PAD_LEE_0089, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_BRIDGE1AND2, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_CAMP | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0D, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0025, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x26, PAD_LEE_0088, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_BRIDGE1AND2, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_CAMP | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0D, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0026, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD | SPAWNFLAG_FIXEDHEIGHT, 0x2d, PAD_LEE_00A4, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_BRIDGE3, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_CAMP | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0D, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x002d, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_MAULER)
	weapon(0x0100, MODEL_CHRMAULER, 0x002d, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	link_guns(-1, -2)
	tag(0x43, -3)
	tag(0x44, -3)
	chr(0, 0x31, PAD_LEE_0095, BODY_SKEDAR, HEAD_RANDOM, 0x0415, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0031, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x32, PAD_LEE_0096, BODY_SKEDAR, HEAD_RANDOM, 0x0415, -1, -1, 1000, 200, CHRFLAG0_GP1 | CHRFLAG0_SKIPSAFETYCHECKS, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0032, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(0, 0x33, PAD_LEE_00DB, BODY_CASSANDRA, HEAD_CASSANDRA, AILIST_INIT_CASS, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_CAMP | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	chr(SPAWNFLAG_FIXEDHEIGHT, 0x34, PAD_LEE_00E3, BODY_SKEDAR, 0x00, GAILIST_IDLE, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_CAMP | CHRFLAG0_HEAR_REQUIRE_LOS, CHRFLAG1_ADJUSTPUNCHSPEED, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0034, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x27, PAD_LEE_0002, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0027, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x28, PAD_LEE_0006, BODY_SKEDAR, HEAD_RANDOM, 0x0403, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0028, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x29, PAD_LEE_0008, BODY_SKEDAR, HEAD_RANDOM, 0x0406, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x0029, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x2a, PAD_LEE_0005, BODY_SKEDAR, HEAD_RANDOM, 0x0404, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x002a, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x2b, PAD_LEE_000D, BODY_SKEDAR, HEAD_RANDOM, 0x0405, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0E, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x002b, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	chr(SPAWNFLAG_BASICGUARD, 0x2c, PAD_LEE_006B, BODY_SKEDAR, HEAD_RANDOM, AILIST_INIT_SKEDAR, -1, -1, 1000, 200, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_HEAR_REQUIRE_LOS, 0, TEAM_ENEMY, SQUADRON_0F, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRMAULER, 0x002c, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_MAULER)
	tag(0x4a, 1)
	key(0x0100, MODEL_CHRCHAIN, 0x0033, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_COLLECTABLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, 0, 0, 8)
	rename_object(-1, WEAPON_NECKLACE, L_LEE_050, L_LEE_051, L_LEE_052, L_LEE_053, L_LEE_054) // "Obtain De Vries' necklace."
	tag(0x3f, 2)
	tag(0x40, 2)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_016A, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x00320000, 0x0001aaaa, 0x00008000, 0, DOORTYPE_SLIDING, 0x00000080, 0x0000012c, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_016B, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDBACK | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x00320000, 0x0001aaaa, 0x00008000, 0, DOORTYPE_SLIDING, 0x00000080, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_016C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_016D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_016E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_016F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0174, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0175, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0176, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0177, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x41, 2)
	tag(0x42, 2)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0178, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0179, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_017A, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_017B, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_017C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_017D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0189, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000040, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0188, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000040, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0186, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000040, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0187, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000040, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x48, 2)
	tag(0x49, 2)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0185, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDBACK, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000040, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0184, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000040, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x46, 2)
	tag(0x47, 2)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_018A, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDBACK, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000040, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_018B, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000040, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0114, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0115, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0116, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0117, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0118, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0119, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_011A, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_011B, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_011C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_011D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_011E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_011F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0120, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0121, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0122, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0123, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0124, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0125, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0126, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0127, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0128, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_0129, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_012A, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_012B, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_012C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_012D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_012E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_012F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR1, PAD_LEE_0134, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00780000, 0x03e80000, 0x00640000, 0x00640000, 0x00010000, 0, DOORTYPE_HULL, 0x00000000, 0x0000ea60, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR2, PAD_LEE_0135, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00780000, 0x03e80000, 0x00640000, 0x00640000, 0x00010000, 0, DOORTYPE_HULL, 0x00000000, 0x0000ea60, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR3, PAD_LEE_0136, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000bd1f, 0x0000bd1f, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR4, PAD_LEE_0137, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000bd1f, 0x0000bd1f, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xfffffffd, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR1, PAD_LEE_0138, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00780000, 0x03e80000, 0x00640000, 0x00640000, 0x00010000, 0, DOORTYPE_HULL, 0x00000000, 0x0000ea60, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR2, PAD_LEE_0139, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00780000, 0x03e80000, 0x00640000, 0x00640000, 0x00010000, 0, DOORTYPE_HULL, 0x00000000, 0x0000ea60, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR3, PAD_LEE_013A, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000bd1f, 0x0000bd1f, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR4, PAD_LEE_013B, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000bd1f, 0x0000bd1f, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xfffffffd, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR1, PAD_LEE_013C, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00780000, 0x03e80000, 0x00640000, 0x00640000, 0x00010000, 0, DOORTYPE_HULL, 0x00000000, 0x0000ea60, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR2, PAD_LEE_013D, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00780000, 0x03e80000, 0x00640000, 0x00640000, 0x00010000, 0, DOORTYPE_HULL, 0x00000000, 0x0000ea60, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR3, PAD_LEE_013E, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000bd1f, 0x0000bd1f, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR4, PAD_LEE_013F, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000bd1f, 0x0000bd1f, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xfffffffd, 0x00000000)
	tag(0x0f, 2)
	tag(0x10, 2)
	door(0x0100, MODEL_SK_CRYOPOD1_BOT, PAD_LEE_0144, OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000eb68, 0x0000eb68, 0x0001aaaa, 0x00002aaa, 0x00002aaa, 0, DOORTYPE_VERTICAL, 0x00000002, 0x00000384, 0x00000000, 0x00000001, 0x00001100)
	door(0x0100, MODEL_SK_CRYOPOD1_TOP, PAD_LEE_0145, OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x0001aaaa, 0x00002aaa, 0x00002aaa, 0, DOORTYPE_VERTICAL, 0x00000002, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x11, 2)
	tag(0x12, 2)
	door(0x0100, MODEL_SK_CRYOPOD1_TOP, PAD_LEE_0146, OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x0001aaaa, 0x00002aaa, 0x00002aaa, 0, DOORTYPE_VERTICAL, 0x00000002, 0x00000384, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_CRYOPOD1_BOT, PAD_LEE_0147, OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000eb68, 0x0000eb68, 0x0001aaaa, 0x00002aaa, 0x00002aaa, 0, DOORTYPE_VERTICAL, 0x00000002, 0x00000384, 0x00000000, 0xffffffff, 0x00001100)
	tag(0x13, 2)
	tag(0x14, 2)
	door(0x0100, MODEL_SK_CRYOPOD1_BOT, PAD_LEE_0148, OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000eb68, 0x0000eb68, 0x0001aaaa, 0x00002aaa, 0x00002aaa, 0, DOORTYPE_VERTICAL, 0x00000002, 0x00000384, 0x00000000, 0x00000001, 0x00001100)
	door(0x0100, MODEL_SK_CRYOPOD1_TOP, PAD_LEE_0149, OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x0001aaaa, 0x00002aaa, 0x00002aaa, 0, DOORTYPE_VERTICAL, 0x00000002, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x15, 2)
	tag(0x16, 2)
	door(0x0100, MODEL_SK_CRYOPOD1_TOP, PAD_LEE_014A, OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x0001aaaa, 0x00002aaa, 0x00002aaa, 0, DOORTYPE_VERTICAL, 0x00000002, 0x00000384, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_CRYOPOD1_BOT, PAD_LEE_014B, OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000eb68, 0x0000eb68, 0x0001aaaa, 0x00002aaa, 0x00002aaa, 0, DOORTYPE_VERTICAL, 0x00000002, 0x00000384, 0x00000000, 0xffffffff, 0x00001100)
	door(0x0100, MODEL_SK_HANGARDOOR_BOT, PAD_LEE_014D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000e666, 0x00005555, 0x00005555, 0x00000444, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00001e00)
	door(0x0100, MODEL_SK_HANGARDOOR_TOP, PAD_LEE_014C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x00005555, 0x00005555, 0x00000444, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_HANGARDOOR_BOT, PAD_LEE_014E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000e666, 0x00005555, 0x00005555, 0x00000444, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00001e00)
	door(0x0100, MODEL_SK_HANGARDOOR_TOP, PAD_LEE_014F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x00005555, 0x00005555, 0x00000444, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_HANGARDOOR_BOT, PAD_LEE_0150, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000e666, 0x00005555, 0x00005555, 0x00000444, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00001e00)
	door(0x0100, MODEL_SK_HANGARDOOR_TOP, PAD_LEE_0151, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x00005555, 0x00005555, 0x00000444, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_HANGARDOOR_BOT, PAD_LEE_0152, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000e666, 0x00005555, 0x00005555, 0x00000444, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00001e00)
	door(0x0100, MODEL_SK_HANGARDOOR_TOP, PAD_LEE_0153, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x00005555, 0x00005555, 0x00000444, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x24, 1)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0154, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0155, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x17, 1)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0156, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000003c0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0157, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000003c0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0158, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000004, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0159, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000004, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_015A, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000004, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_015B, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDBACK, 0, 1000, 0x00010000, 0x00010000, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000004, 0x000000f0, 0x00000000, 0xffffffff, 0x00000000)
	tag(0x31, 6)
	tag(0x32, 6)
	tag(0x33, 8)
	tag(0x34, 8)
	tag(0x2a, 1)
	lift(0x0100, MODEL_SK_LIFT, PAD_LEE_0194, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0194, 0x0195, -1, -1, 0x00000001, 0x00000005, 0x00000000, 0x00000000, 0x00030000, 0x00050000, 0x1f000000)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_015C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00320000, 0x0001aaaa, 0x00008000, 0, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR1, PAD_LEE_015D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x00010000, 0x00320000, 0x0001aaaa, 0x00008000, 0, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-2, -3, 0)
	lift_door(-2, -4, 0)
	door(0x0100, MODEL_SK_HANGARDOOR_BOT, PAD_LEE_015E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000e666, 0x000a0000, 0x000a0000, 0x00008000, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00000500)
	door(0x0100, MODEL_SK_HANGARDOOR_TOP, PAD_LEE_015F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x000a0000, 0x000a0000, 0x00008000, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-2, -7, 1)
	lift_door(-2, -8, 1)
	tag(0x35, 6)
	tag(0x36, 6)
	tag(0x37, 8)
	tag(0x38, 8)
	tag(0x2b, 1)
	lift(0x0100, MODEL_SK_LIFT, PAD_LEE_0196, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0196, 0x0197, -1, -1, 0x00000001, 0x00000005, 0x00000000, 0x00000000, 0x00030000, 0x00050000, 0x1f000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0160, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x000a0000, 0x00005555, 0x00001999, 0, DOORTYPE_SLIDING, 0x00000080, 0x0000012c, 0x00000000, 0x00000001, 0x00000500)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0161, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x00010000, 0x00010000, 0x000a0000, 0x00005555, 0x00001999, 0, DOORTYPE_SLIDING, 0x00000080, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-2, -3, 0)
	lift_door(-2, -4, 0)
	door(0x0100, MODEL_SK_HANGARDOOR_BOT, PAD_LEE_0162, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000e666, 0x000a0000, 0x000a0000, 0x00008000, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00000500)
	door(0x0100, MODEL_SK_HANGARDOOR_TOP, PAD_LEE_0163, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x000a0000, 0x000a0000, 0x00008000, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-2, -7, 1)
	lift_door(-2, -8, 1)
	tag(0x39, 5)
	tag(0x3a, 5)
	tag(0x29, 2)
	tag(0x0e, 1)
	lift(0x0100, MODEL_SK_LIFT, PAD_LEE_0193, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0193, 0x0192, -1, -1, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00008000, 0x00050000, 0x1f000000)
	door(0x0100, MODEL_SK_HANGARDOORB_BOT, PAD_LEE_0166, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x0000e666, 0x000a0000, 0x000a0000, 0x00008000, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00000500)
	door(0x0100, MODEL_SK_HANGARDOORB_TOP, PAD_LEE_0167, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000e666, 0x0000e666, 0x000a0000, 0x000a0000, 0x00008000, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-2, -3, 1)
	lift_door(-2, -4, 1)
	tag(0x3b, 5)
	tag(0x3c, 5)
	tag(0x28, 2)
	tag(0x0c, 1)
	lift(0x0100, MODEL_SK_LIFT, PAD_LEE_0190, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x0190, 0x0191, -1, -1, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00008000, 0x00050000, 0x1f000000)
	door(0x0100, MODEL_SK_HANGARDOORB_BOT, PAD_LEE_0164, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000e666, 0x000a0000, 0x000a0000, 0x00008000, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00000500)
	door(0x0100, MODEL_SK_HANGARDOORB_TOP, PAD_LEE_0165, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x000a0000, 0x000a0000, 0x00008000, 0, DOORTYPE_VERTICAL, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-2, -3, 0)
	lift_door(-2, -4, 0)
	tag(0x3d, 5)
	tag(0x3e, 5)
	tag(0x26, 2)
	tag(0x22, 1)
	lift(0x0100, MODEL_SK_LIFT, PAD_LEE_018E, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x018e, 0x018f, -1, -1, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00028000, 0x1f000000)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0182, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x0000e666, 0x00005555, 0x00005555, 0x00000444, 0, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_DOOR2, PAD_LEE_0183, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000e666, 0x0000e666, 0x00005555, 0x00005555, 0x00000444, 0, DOORTYPE_SLIDING, 0x00000000, 0x0000012c, 0x00000000, 0xffffffff, 0x00000000)
	lift_door(-2, -3, 0)
	lift_door(-2, -4, 0)
	fan(0x0100, MODEL_SK_SHIP_HOLO1, PAD_LEE_0110, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000, 0x00000222, 0x00000002, 0x01000000)
	fan(0x0100, MODEL_SK_SHIP_HOLO2, PAD_LEE_0112, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000, 0x00000222, 0x00000002, 0x01000000)
	fan(0x0100, MODEL_SK_SHIP_HOLO2, PAD_LEE_0113, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000, 0x00000222, 0x00000002, 0x01000000)
	tag(0x00, 4)
	tag(0x01, 4)
	tag(0x02, 4)
	tag(0x03, 4)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR1, PAD_LEE_0140, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00780000, 0x03e80000, 0x00640000, 0x00640000, 0x00010000, 0, DOORTYPE_HULL, 0x00000000, 0x0000ea60, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR2, PAD_LEE_0141, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00780000, 0x03e80000, 0x00640000, 0x00640000, 0x00010000, 0, DOORTYPE_HULL, 0x00000000, 0x0000ea60, 0x00000000, 0x00000001, 0x00000000)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR3, PAD_LEE_0142, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x0000bd1f, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0x00000001, 0x00001d00)
	door(0x0100, MODEL_SK_SHIP_HULLDOOR4, PAD_LEE_0143, OBJFLAG_00000010 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x00010000, 0x0000bd1f, 0x00050000, 0x00002aaa, 0x00000ccc, 0, DOORTYPE_SLIDING, 0x00000000, 0x000000f0, 0x00000000, 0xfffffffd, 0x00001d00)
	tag(0x09, 1)
	multimonitor(0x00cc, MODEL_SK_CONSOLE2, PAD_LEE_01F1, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_IMMUNETOANTI, OBJFLAG3_INTERACTABLE, 1000, 21, 20, 20, 0)
	multimonitor(0x00cc, MODEL_SK_CONSOLE2, PAD_LEE_01F2, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_IMMUNETOANTI, 0, 1000, 21, 20, 20, 0)
	weapon(0x0100, MODEL_CHRSKROCKET, PAD_LEE_01D2, 0, 0, 0, WEAPON_SLAYER)
	tag(0x04, 3)
	tag(0x05, 3)
	tag(0x06, 3)
	multimonitor(0x00cc, MODEL_SK_CONSOLE2, PAD_LEE_01F0, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_IMMUNETOANTI, 0, 1000, 21, 20, 20, 0)
	multimonitor(0x00cc, MODEL_SK_CONSOLE2, PAD_LEE_01EF, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_IMMUNETOANTI, 0, 1000, 21, 20, 20, 0)
	multimonitor(0x00cc, MODEL_SK_CONSOLE2, PAD_LEE_01EE, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_IMMUNETOANTI, 0, 1000, 21, 20, 20, 0)
	tinted_glass(0x0100, MODEL_SK_WINDOW1, PAD_LEE_01CA, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x00c801f4)
	tinted_glass(0x0100, MODEL_SK_WINDOW1, PAD_LEE_01CB, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, 0x00c801f4)
	tag(0x19, 2)
	tag(0x1a, 2)
	stdobject(0x0100, MODEL_ENGINEPART, PAD_LEE_01EA, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000)
	stdobject(0x0100, MODEL_ENGINEPART, PAD_LEE_01E9, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000)
	tag(0x1b, 6)
	tag(0x1c, 6)
	tag(0x1d, 6)
	tag(0x1e, 6)
	tag(0x1f, 6)
	tag(0x20, 6)
	glass(0x0100, MODEL_DD_WINDOW, PAD_LEE_019D, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 3000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_LEE_019E, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 3000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_LEE_019F, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 3000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_LEE_01A0, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 3000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_LEE_01A1, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 3000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_LEE_01A2, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 3000)
	tag(0x21, 1)
	stdobject(0x0002, MODEL_SK_SHUTTLE, PAD_LEE_01DC, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_COLLECTABLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_REMOVEWHENDESTROYED | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_INVISIBLE | OBJFLAG2_DEFAULT_80000000, 0, 1000)
	tag(0x2c, 1)
	stdobject(0x0100, MODEL_SK_SHUTTLE, -1, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_IGNOREROOMCOLOUR | OBJFLAG_INVINCIBLE, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	tag(0x45, 1)
	stdobject(0x0100, MODEL_SK_SHUTTLE, -1, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_IGNOREROOMCOLOUR | OBJFLAG_INVINCIBLE, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	tag(0x2d, 1)
	shield(0x0100, MODEL_CHRSHIELD, PAD_LEE_01F3, OBJFLAG_FALL, OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD, 0, 1000)
	tag(0x2e, 1)
	shield(0x0100, MODEL_CHRSHIELD, 0x0030, OBJFLAG_FALL | OBJFLAG_ASSIGNEDTOCHR, OBJFLAG2_EXCLUDE_SA | OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD, 0, 1)
	endprops
};

s32 intro[] = {
#if VERSION >= VERSION_JPN_FINAL
	ammo(AMMOTYPE_PISTOL, 10)
	intro_weapon(WEAPON_FALCON2, -1)
	ammo(AMMOTYPE_PISTOL, 20)
	ammo(AMMOTYPE_KNIFE, 1)
	ammo(AMMOTYPE_ROCKET, 2)
	ammo(AMMOTYPE_RIFLE, 400)
#else
	intro_weapon(WEAPON_COMBATKNIFE, -1)
	ammo(AMMOTYPE_KNIFE, 1)
	ammo(AMMOTYPE_ROCKET, 2)
	ammo(AMMOTYPE_RIFLE, 400)
	ammo(AMMOTYPE_PISTOL, 10)
#endif
	outfit(OUTFIT_FROCK_RIPPED)
	spawn(PAD_LEE_00D9)
	endintro
};

s32 path00[] = {
	PAD_LEE_01D5,
	PAD_LEE_01D4,
	-1,
};

s32 path01[] = {
	PAD_LEE_01D7,
	PAD_LEE_01D6,
	-1,
};

s32 path02[] = {
	PAD_LEE_0006,
	PAD_LEE_0000,
	-1,
};

s32 path03[] = {
	PAD_LEE_0005,
	PAD_LEE_000D,
	-1,
};

s32 path04[] = {
	PAD_LEE_01DE,
	PAD_LEE_000C,
	-1,
};

s32 path05[] = {
	PAD_LEE_0008,
	PAD_LEE_005C,
	-1,
};

u8 func1001_objectives_failed_msg[] = {
	yield
	set_ailist(CHR_SELF, GAILIST_SHOW_OBJ_FAILED_MSG)
	endlist
};

u8 func1400_setup_counterop[] = {
#if VERSION >= VERSION_NTSC_1_0
	set_object_flag(OBJ_HANGARLIFT_ELVIS, OBJFLAG_DEACTIVATED)
	set_object_flag(OBJ_HANGARLIFT_JO, OBJFLAG_DEACTIVATED)
#endif
	yield
	set_chr_team(CHR_ANTI, TEAM_ENEMY)
	set_ailist(CHR_SELF, GAILIST_REBUILD_GROUPS)
	endlist
};

u8 func1019_check_shields_lowered[] = {
	beginloop(0x04)
		if_object_in_good_condition(OBJ_SHIELDCONSOLE1, /*goto*/ 0x06)
		if_object_in_good_condition(OBJ_SHIELDCONSOLE2, /*goto*/ 0x06)
		if_object_in_good_condition(OBJ_SHIELDCONSOLE3, /*goto*/ 0x06)
		show_hudmsg(CHR_BOND, L_LEE_010) // "Ship's shields have been lowered."
		set_stage_flag(STAGEFLAG_SHIELDS_DISABLED)
		if_difficulty_lt(DIFF_PA, /*goto*/ 0x09)
		restart_timer

		beginloop(0x08)
			if_chr_in_room(CHR_BOND, 0x00, 0x0002, /*goto*/ 0x2c)
		endloop(0x08)

		label(0x2c)
		speak(CHR_BOND, L_LEE_017, SFX_81A1, CHANNEL_6, COLOR_04_ORANGE) // "You've got to open the hangar doors so we can dock..."
		set_ailist(CHR_SELF, GAILIST_IDLE)

		label(0x06)
	endloop(0x04)

	label(0x09)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1004_check_hangar_doors_opened[] = {
	yield
	set_object_flag(OBJ_HANGARDOOR1, OBJFLAG_CANNOT_ACTIVATE)
	set_object_flag(OBJ_HANGARDOOR2, OBJFLAG_CANNOT_ACTIVATE)
	set_object_flag(OBJ_HANGARDOOR3, OBJFLAG_CANNOT_ACTIVATE)
	set_object_flag(OBJ_HANGARDOOR4, OBJFLAG_CANNOT_ACTIVATE)

	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_difficulty_lt(DIFF_PA, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, OBJ_HANGARDOORCONSOLE, /*goto*/ 0x06)
		if_object_in_good_condition(OBJ_HANGARDOORCONSOLE, /*goto*/ 0x2d)

		// Console destroyed
		show_hudmsg(CHR_BOND, L_LEE_048) // "Critical mission object destroyed."
		set_stage_flag(STAGEFLAG_HANGAR_DOOR_CONSOLE_DESTROYED)
		set_ailist(CHR_SELF, GAILIST_IDLE)

		// Console healthy
		label(0x2d)
		reloop(0x04)

		// A and SA
		label(0x2c)
		if_stage_flag_eq(STAGEFLAG_SHIELDS_DISABLED, TRUE, /*goto*/ 0x03)
		reloop(0x04)

		// Console activated
		label(0x06)
		if_stage_flag_eq(STAGEFLAG_SHIELDS_DISABLED, TRUE, /*goto*/ 0x2c)
		show_hudmsg(CHR_BOND, L_LEE_047) // "Hangar doors locked - shields still active."
		restart_timer

		beginloop(LABEL_65)
			if_timer_gt(120, /*goto*/ 0x06)
		endloop(LABEL_65)

		label(0x06)
	endloop(0x04)

	// PA - console activated after shields disabled
	label(0x2c)
	show_hudmsg(CHR_P1P2, L_LEE_011) // "Hangar doors have been opened."
	set_stage_flag(STAGEFLAG_HANGAR_DOORS_OPEN)

	// A and SA once shields disabled, or follow through from above
	label(0x03)
	open_door(OBJ_HANGARDOOR1)
	open_door(OBJ_HANGARDOOR2)
	open_door(OBJ_HANGARDOOR3)
	open_door(OBJ_HANGARDOOR4)
	set_object_flag(OBJ_HANGARDOOR1, OBJFLAG_DOOR_KEEPOPEN)
	set_object_flag(OBJ_HANGARDOOR2, OBJFLAG_DOOR_KEEPOPEN)
	set_object_flag(OBJ_HANGARDOOR3, OBJFLAG_DOOR_KEEPOPEN)
	set_object_flag(OBJ_HANGARDOOR4, OBJFLAG_DOOR_KEEPOPEN)
	restart_timer

	beginloop(0x09)
		if_timer_gt(600, /*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	restart_timer

	beginloop(0x0a)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x0a)

	label(0x06)
	set_stage_flag(STAGEFLAG_TRIGGER_HANGAR_MAIANS)

	label(0x08)
	yield
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040d_elvis_wait_for_hangar_entry[] = {
	set_self_chrflag(CHRCFLAG_NEVERSLEEP)
	set_accuracy(100)
	set_reaction_speed(100)
	add_health_or_armor(200)
	set_alertness(100)
	set_self_chrflag(CHRCFLAG_HIDDEN)
	set_self_chrflag(CHRCFLAG_INVINCIBLE)
	set_self_chrflag(CHRCFLAG_RUNFASTER)
	set_self_chrflag(CHRCFLAG_NOAUTOAIM)

	beginloop(0x04)
		if_difficulty_lt(DIFF_PA, /*goto*/ 0x2c)
		if_stage_flag_eq(STAGEFLAG_HANGAR_DOORS_OPEN, TRUE, /*goto*/ 0x06)
		reloop(0x04)

		label(0x2c)
		if_stage_flag_eq(STAGEFLAG_SHIELDS_DISABLED, TRUE, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)

	beginloop(LABEL_65)
		set_target_chr(CHR_BOND)
		if_los_to_target(/*goto*/ 0x2c)
		set_target_chr(CHR_COOP)
		if_los_to_target(/*goto*/ 0x2c)
		set_target_chr(CHR_ANTI)
		if_los_to_target(/*goto*/ 0x2c)
		goto_next(0x06)

		label(0x2c)
	endloop(LABEL_65)

	label(0x06)
	unset_self_chrflag(CHRCFLAG_HIDDEN)
	unset_self_chrflag(CHRCFLAG_INVINCIBLE)
	yield
	yield
	yield
	yield
	set_ailist(CHR_SELF, AILIST_ELVIS_GIVE_AR34)
	endlist
};

u8 func040e_elvis_give_ar34[] = {
	set_shotlist(AILIST_ELVIS_GIVE_AR34)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c)
	if_chr_dead(CHR_SELF, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c)
	goto_next(0x06)

	label(0x2c)
	set_shotlist(GAILIST_IDLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x06)
	stop_chr

	// Wait until player in sight
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		set_chrpreset(CHR_P1P2)
		if_los_to_target(/*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)

	beginloop(0x08)
		if_los_to_target(/*goto*/ 0x2c)
	endloop(0x08)

	// Run towards player
	label(0x0a)
	restart_timer
	try_run_to_target(/*goto*/ 0x09)

	beginloop(0x09)
		set_target_chr(CHR_PRESET)
		if_timer_gt(60, /*goto*/ 0x2c)
		if_distance_to_target_lt(200, /*goto*/ 0x06)
		reloop(0x09)

		label(0x06)
		if_los_to_target(/*goto*/ 0x06)
	endloop(0x09)

	label(0x2c)
	goto_first(0x0a)

	// Talk
	label(0x06)
	set_chr_team(CHR_SELF, TEAM_ALLY)
	rebuild_teams
	rebuild_squadrons
	set_stage_flag(STAGEFLAG_MET_ELVIS)
	speak(CHR_P1P2, L_LEE_019, MP3_02E1, CHANNEL_6, COLOR_04_ORANGE) // "Good to see you, Joanna."
	chr_do_animation(ANIM_TALKING_0231, 0, -1, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

	beginloop(0x0c)
		if_timer_gt(180, /*goto*/ 0x06)
	endloop(0x0c)

	label(0x06)
	speak(CHR_P1P2, L_LEE_020, MP3_02E2, CHANNEL_6, COLOR_04_ORANGE) // "Take this - you should find it useful..."
	give_object_to_chr(OBJ_AR34, CHR_PRESET)
	show_hudmsg(CHR_PRESET, L_LEE_021) // "Received AR34 assault rifle."
	restart_timer

	beginloop(0x0d)
		if_timer_gt(180, /*goto*/ 0x06)
	endloop(0x0d)

	label(0x06)
	set_stage_flag(STAGEFLAG_HANGAR_ALARM_ACTIVATED)
	activate_alarm
	restart_timer

	beginloop(0x0e)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x0e)

	label(0x06)
	label(0x0f)
	yield
	set_ailist(CHR_SELF, AILIST_ELVIS_FOLLOW)
	endlist
};

/**
 * Follow player.
 * If entered nav room, do that objective.
 * If arrived at prebridge lift, assign another function.
 */
u8 func0409_elvis_follow[] = {
#if VERSION >= VERSION_NTSC_1_0
	set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
#endif
	set_shotlist(AILIST_ELVIS_FOLLOW)
	set_returnlist(CHR_SELF, AILIST_ELVIS_FOLLOW)
	if_chr_dead(CHR_SELF, /*goto*/ 0x2c)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c)
	goto_next(0x06)

	// Dying
	label(0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Alive
	label(0x06)
	if_just_injured(CHR_SELF, /*goto*/ 0x2c)
	goto_next(0x06)

	// Injured
	label(0x2c)
#if VERSION >= VERSION_NTSC_1_0
	restart_timer
	say_quip(CHR_BOND, 0x29, 0xff, 0x03, 0xff, BANK_1, 0x00, 0x00)
	dprint 'I','N','J','U','R','E','D','\n',0,

	beginloop(LABEL_C1)
		if_timer_gt(180, /*goto*/ 0x06)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(LABEL_C1)

	// Healthy
	label(0x06)
	dprint 'I','N','J','U','R','E','D','F','I','N','\n',0,
#else
	say_quip(CHR_BOND, 0x29, 0xff, 0x03, 0xff, BANK_1, 0x00, 0x00)

	beginloop(LABEL_C1)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(LABEL_C1)

	label(0x06)
#endif

	if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
	set_target_chr(CHR_PRESET)
	if_distance_to_target_lt(200, /*goto*/ 0x06)

	label(0x03)
	set_target_chr(CHR_PRESET)
	restart_timer
	if_distance_to_target_gt(500, /*goto*/ 0x06)
	try_jog_to_target(/*goto*/ 0x04)

	// Distance < 200 or distance > 500
	label(0x06)
	try_run_to_target(/*goto*/ 0x04)

	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_NAVIGATION_ROOM_DONE, TRUE, /*goto*/ 0x2c)
		if_chr_in_room(CHR_ELVIS, 0x00, 0x003e, /*goto*/ LABEL_B5)
		label(0x2c)
		if_stage_flag_eq(STAGEFLAG_SAID_GO_ON_AHEAD, TRUE, /*goto*/ 0x2c)
		if_chr_in_room(CHR_ELVIS, 0x00, 0x006c, /*goto*/ LABEL_C4)
		label(0x2c)
		dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
		set_target_chr(CHR_PRESET)
		if_distance_to_target_lt(200, /*goto*/ 0x06)
		if_timer_gt(60, /*goto*/ 0x2c)
	endloop(0x04)

	// Running for 1 second - do distance checks again
	label(0x2c)
	goto_first(0x03)

	// At player
	label(0x06)
	stop_chr

	beginloop(0x09)
		if_stage_flag_eq(STAGEFLAG_NAVIGATION_ROOM_DONE, TRUE, /*goto*/ 0x2c)
		if_chr_in_room(CHR_ELVIS, 0x00, 0x003e, /*goto*/ LABEL_B5)
		label(0x2c)
		if_stage_flag_eq(STAGEFLAG_SAID_GO_ON_AHEAD, TRUE, /*goto*/ 0x2c)
		if_chr_in_room(CHR_ELVIS, 0x00, 0x006c, /*goto*/ LABEL_C4)
		label(0x2c)
		dprint 'A','T',' ','P','A','D','\n',0,
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
		set_target_chr(CHR_PRESET)
		if_distance_to_target_gt(300, /*goto*/ 0x06)
	endloop(0x09)

	// Player moved away - do distance checks and start following
	label(0x06)
	goto_first(0x03)

	// Enemy detected
	label(0x08)
	if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2c)
	if_chr_dead(CHR_TARGET, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2c)
	if_chrpresets_target_is_different(/*goto*/ 0x06)
	label(0x2c)
	goto_first(0x03)

	label(0x06)
	dprint 'D','E','T','E','C','T','E','D','\n',0,
	call_rng
	if_rand_lt(85, /*goto*/ LABEL_65)
	if_rand_lt(170, /*goto*/ LABEL_66)
	say_quip(CHR_BOND, 0x26, 0xff, 0x03, 0xff, BANK_1, 0x00, 0x00)
	goto_next(0x2c)
	label(LABEL_65)
	say_quip(CHR_BOND, 0x27, 0xff, 0x03, 0xff, BANK_1, 0x00, 0x00)
	goto_next(0x2c)
	label(LABEL_66)
	say_quip(CHR_BOND, 0x28, 0xff, 0x03, 0xff, BANK_1, 0x00, 0x00)
	label(0x2c)
	set_returnlist(CHR_SELF, AILIST_ELVIS_FOLLOW)
	set_shotlist(AILIST_ELVIS_FOLLOW)
	set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)

	// Elvis in nav room
	label(LABEL_B5)
	jog_to_pad(PAD_LEE_0034)

	beginloop(0x0f)
		if_chr_stopped(/*goto*/ 0x2c)
	endloop(0x0f)

	label(0x2c)
	restart_timer
	chr_do_animation(ANIM_OPERATE_0221, 0, -1, 0, 16, CHR_SELF, 2)

	beginloop(0x10)
		if_timer_gt(180, /*goto*/ 0x06)
	endloop(0x10)

	label(0x06)
	do_preset_animation(PRESETANIM_TALKRANDOM)
	show_hudmsg(CHR_BOND, L_LEE_013) // "Navigational information has been retrieved."
	speak(CHR_PRESET, L_LEE_031, MP3_02E4, CHANNEL_6, COLOR_04_ORANGE) // "Time to head upwards..."
	restart_timer
	set_stage_flag(STAGEFLAG_NAVIGATION_ROOM_DONE)

	beginloop(LABEL_79)
		if_timer_gt(90, /*goto*/ 0x06)
	endloop(LABEL_79)

	label(0x06)
	mute_channel(CHANNEL_6)
	goto_first(0x03)

	// Elvis outside prebridgelift
	label(LABEL_C4)
	set_ailist(CHR_SELF, AILIST_INIT_ELVIS_OUTSIDE_PREBRIDGELIFT)
	endlist
};

u8 func041d_init_elvis_outside_prebridgelift[] = {
	set_shotlist(AILIST_ELVIS_OUTSIDE_PREBRIDGELIFT)
	add_health_or_armor(600)
	set_ailist(CHR_SELF, AILIST_ELVIS_OUTSIDE_PREBRIDGELIFT)
	endlist
};

u8 func041c_elvis_outside_prebridgelift[] = {
	set_shotlist(AILIST_ELVIS_OUTSIDE_PREBRIDGELIFT)
	if_chr_dead(CHR_SELF, /*goto*/ 0x2c)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c)
	goto_next(0x06)

	// Dying
	label(0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Alive
	label(0x06)
	stop_chr
	set_target_chr(CHR_PRESET)
	set_stage_flag(STAGEFLAG_SAID_GO_ON_AHEAD)
	if_stage_flag_eq(STAGEFLAG_ENTERED_BRIDGELIFT, TRUE, /*goto*/ 0x2c)
	speak(CHR_PRESET, L_LEE_026, MP3_04DC, CHANNEL_6, COLOR_04_ORANGE) // "You go on ahead, Jo. I'll secure the perimeter. We..."
	label(0x2c)
	run_to_pad(PAD_LEE_0063)

	beginloop(0x09)
		if_chr_stopped(/*goto*/ 0x0b)
	endloop(0x09)

	label(0x0b)
	stop_chr

	beginloop(0x0c)
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
	endloop(0x0c)

	label(0x08)
	dprint 'D','E','T','E','C','T','E','D','\n',0,
	set_shotlist(AILIST_ELVIS_OUTSIDE_PREBRIDGELIFT)
	set_returnlist(CHR_SELF, AILIST_ELVIS_OUTSIDE_PREBRIDGELIFT)
	set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)
	endlist
};

u8 func040a_elvis_go_to_hangar_lift[] = {
	set_shotlist(AILIST_ELVIS_GO_TO_HANGAR_LIFT)
	if_chr_dead(CHR_SELF, /*goto*/ 0x2c)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c)
	goto_next(0x06)

	// Dying
	label(0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Alive
	label(0x06)

	label(0x03)
	set_target_chr(CHR_BOND)
	restart_timer
	if_morale_lt(50, /*goto*/ 0x06)
	goto_next(LABEL_C3)

	label(0x06)
	try_run_to_target(/*goto*/ 0x04)

	beginloop(0x04)
		if_timer_gt(60, /*goto*/ 0x2c)
		if_distance_to_target_lt(200, /*goto*/ 0x06)
	endloop(0x04)

	label(0x2c)
	goto_first(0x03)

	// At player
	label(0x06)
	speak(CHR_BOND, L_LEE_022, MP3_02E4, CHANNEL_6, COLOR_04_ORANGE) // "Time to head upwards. I'll take this lift; you tak..."
	chr_do_animation(ANIM_TALKING_0231, 0, -1, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)
	set_morale(50)

	beginloop(0x0c)
		if_timer_gt(180, /*goto*/ LABEL_C3)
	endloop(0x0c)

	// Done talk
	label(LABEL_C3)
	restart_timer
	run_to_pad(PAD_LEE_00B2)

	beginloop(0x0d)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x0d)

	label(0x06)
	stop_chr
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func041b_elvis_at_bridge[] = {
	stop_chr
	set_shotlist(AILIST_ELVIS_AT_BRIDGE)
	if_chr_dead(CHR_SELF, /*goto*/ 0x2c)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c)
	goto_next(0x06)

	// Dying
	label(0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Alive
	label(0x06)
	label(0x06)
	if_morale_lt(100, /*goto*/ 0x06)
	goto_next(0x2c)

	label(0x06)
	set_morale(100)
	label(0x2c)

	beginloop(LABEL_65)
		if_sound_finished(CHANNEL_6, /*goto*/ 0x2c)
	endloop(LABEL_65)

	label(0x2c)
	run_to_pad(PAD_LEE_008A)
	restart_timer

	beginloop(0x09)
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
		if_chr_stopped(/*goto*/ 0x0b)
		if_stage_flag_eq(STAGEFLAG_SAID_LOOKOUT, TRUE, /*goto*/ 0x06)
		if_timer_gt(180, /*goto*/ 0x2c)
		label(0x06)
		reloop(0x09)

		label(0x2c)
		speak(CHR_TARGET, L_LEE_024, MP3_02E3, CHANNEL_6, COLOR_04_ORANGE) // "Look out, Joanna! I think we've made them angry..."
		set_stage_flag(STAGEFLAG_SAID_LOOKOUT)
	endloop(0x09)

	// Reached pad
	label(0x0b)
	stop_chr

	beginloop(0x0c)
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
	endloop(0x0c)

	label(0x08)
	dprint 'D','E','T','E','C','T','E','D','\n',0,
	set_shotlist(AILIST_ELVIS_AT_BRIDGE)
	set_returnlist(CHR_SELF, AILIST_ELVIS_AT_BRIDGE)
	set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)
	endlist
};

u8 func1005_check_elvis_dead[] = {
	beginloop(0x04)
		if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c)
		if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c)
		if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	show_hudmsg(CHR_BOND, L_LEE_012) // "Elvis has been killed."
	set_stage_flag(STAGEFLAG_ELVIS_DEAD)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040f_init_skedar[] = {
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x0d)
	if_chr_dead(CHR_SELF, /*goto*/ 0x0d)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x0d)

	// Alive
	set_accuracy(VERSION >= VERSION_NTSC_1_0 ? 20 : 40)
	set_reaction_speed(75)
	set_chr_maxdamage(CHR_SELF, 10)
	add_health_or_armor(190)
	set_recovery_speed(0)
	set_shield(0)
	set_ailist(CHR_SELF, GAILIST_RELATED_TO_SPAWNING)

	// Dying or dead
	label(0x0d)
	set_shotlist(GAILIST_IDLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0410_wake_suspendedanim_skedar[] = {
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c)
	if_chr_dead(CHR_SELF, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c)
	goto_next(0x06)

	label(0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x06)
	set_accuracy(VERSION >= VERSION_NTSC_1_0 ? 20 : 40)
	set_reaction_speed(75)
	set_chr_maxdamage(CHR_SELF, 10)
	add_health_or_armor(190)
	set_recovery_speed(0)
	set_shield(0)
	set_target_chr(CHR_BOND)
	try_walk_to_target(/*goto*/ 0x2c)

	label(0x2c)
	set_shotlist(GAILIST_RELATED_TO_SPAWNING)
	set_ailist(CHR_SELF, GAILIST_RELATED_TO_SPAWNING)
	endlist
};

u8 func1006_wake_slayer_skedar[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0033, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	restart_timer

	beginloop(0x08)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x08)

	// 1
	label(0x06)
	unlock_door(0x0f, 0x02)
	unlock_door(0x10, 0x02)
	open_door(0x0f)
	set_chr_team(CHR_SUSPENDEDANIM1, TEAM_ENEMY)
	rebuild_teams
	rebuild_squadrons
	set_ailist(CHR_SUSPENDEDANIM1, AILIST_WAKE_SUSPENDEDANIM_SKEDAR)
	restart_timer

	beginloop(0x09)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x09)

	// 2
	label(0x06)
	unlock_door(0x13, 0x02)
	unlock_door(0x14, 0x02)
	open_door(0x13)

	if_chr_death_animation_finished(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c)
	if_chr_dead(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c)
	set_ailist(CHR_SUSPENDEDANIM3, AILIST_WAKE_SUSPENDEDANIM_SKEDAR)

	set_chr_team(CHR_SUSPENDEDANIM3, TEAM_ENEMY)
	rebuild_teams
	rebuild_squadrons

	// Wait until player coming back from Slayer area
	label(0x2c)

	beginloop(0x0a)
		chr_toggle_p1p2(CHR_SELF)
		if_stage_flag_eq(STAGEFLAG_ENTERED_SLAYER_AREA, TRUE, /*goto*/ 0x2c)
		reloop(0x0a)

		label(0x2c)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0033, /*goto*/ 0x2c)
	endloop(0x0a)

	// 3
	label(0x2c)
	unlock_door(0x11, 0x02)
	unlock_door(0x12, 0x02)
	unlock_door(0x15, 0x02)
	unlock_door(0x16, 0x02)
	open_door(0x11)
	open_door(0x15)
	set_ailist(CHR_SUSPENDEDANIM2, AILIST_WAKE_SUSPENDEDANIM_SKEDAR)
	set_chr_team(CHR_SUSPENDEDANIM2, TEAM_ENEMY)
	rebuild_teams
	rebuild_squadrons

	// 4
	set_ailist(CHR_SUSPENDEDANIM4, AILIST_WAKE_SUSPENDEDANIM_SKEDAR)
	set_chr_team(CHR_SUSPENDEDANIM4, TEAM_ENEMY)
	rebuild_teams
	rebuild_squadrons
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1007_check_entered_slayer_area[] = {
	beginloop(0x08)
		if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c)
		if_chr_in_room(CHR_BOND, 0x00, 0x003a, /*goto*/ 0x2c)
		if_chr_in_room(CHR_BOND, 0x00, 0x003b, /*goto*/ 0x2c)
		reloop(0x08)

		label(0x2c)
		if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d)
		if_chr_in_room(CHR_COOP, 0x00, 0x003a, /*goto*/ 0x06)
		if_chr_in_room(CHR_COOP, 0x00, 0x003b, /*goto*/ 0x06)
	endloop(0x08)

	label(0x2d)
	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x0d)
	label(0x06)
	set_stage_flag(STAGEFLAG_ENTERED_SLAYER_AREA)
	label(0x0d)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1008_hangar_lifts[] = {
	set_object_flag(OBJ_HANGARLIFT_ELVIS, OBJFLAG_DEACTIVATED)
	set_object_flag(OBJ_HANGARLIFT_JO, OBJFLAG_DEACTIVATED)

	// Wait until kills done
	beginloop(0x08)
		if_stage_flag_eq(STAGEFLAG_HANGAR_KILLS_DONE, TRUE, /*goto*/ 0x2c)
	endloop(0x08)

	// Activate Jo's lift so it starts going to bottom
	label(0x2c)
	dprint 'U','N','\n',0,
	unset_object_flag(OBJ_HANGARLIFT_JO, OBJFLAG_DEACTIVATED)
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield

	// Wait until lift stopped at bottom
	beginloop(LABEL_65)
		dprint 'D','A','\n',0,
		if_lift_stationary(OBJ_HANGARLIFT_JO, /*goto*/ LABEL_66)
	endloop(LABEL_65)

	// Deactivate lift and open door
	label(LABEL_66)
	set_object_flag(0x39, OBJFLAG_DOOR_KEEPOPEN)
	set_object_flag(0x3a, OBJFLAG_DOOR_KEEPOPEN)
	unset_object_flag(OBJ_HANGARLIFT_JO, OBJFLAG_DEACTIVATED)
	open_door(0x39)
	open_door(0x3a)
	yield
	set_object_flag(OBJ_HANGARLIFT_JO, OBJFLAG_DEACTIVATED)

	beginloop(LABEL_67)
		dprint 'T','R','\n',0,
		chr_toggle_p1p2(CHR_SELF)
		if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c)
		if_chr_in_room(CHR_BOND, 0x00, 0x0018, /*goto*/ 0x2c)
		if_door_state(0x39, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x2d)
		if_door_state(0x3a, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x2d)
	endloop(LABEL_67)

	// Door closing automatically - reopen it
	label(0x2d)
	dprint 'P','E','\n',0,
	goto_first(LABEL_66)

	// Jo has entered the lift, or Jo dead in co-op
	label(0x2c)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c)
	if_chr_in_room(CHR_COOP, 0x00, 0x0018, /*goto*/ 0x2c)
	goto_first(LABEL_67)

	// Jo or Velvet is in the lift - activate it
	// Note the lift naturally waits 5 seconds at each stop,
	// hence the 5 second wait if entered as soon as the door opens.
	label(0x2c)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP)
	unset_object_flag(0x39, OBJFLAG_DOOR_KEEPOPEN)
	unset_object_flag(0x3a, OBJFLAG_DOOR_KEEPOPEN)
	unset_object_flag(OBJ_HANGARLIFT_JO, OBJFLAG_DEACTIVATED)

	// Wait until Y coordinate >= 400
	beginloop(0x09)
		dprint 'P','U','\n',0,
		chr_toggle_p1p2(CHR_SELF)
		if_chr_death_animation_finished(CHR_P1P2, /*goto*/ 0x2c)
		if_chr_y(CHR_P1P2, 400, OPERATOR_LESS_THAN, /*goto*/ 0x2c)
		goto_next(0x0a)

		label(0x2c)
	endloop(0x09)

	// Wait until lift stopped at top
	beginloop(0x0a)
		if_lift_stationary(OBJ_HANGARLIFT_JO, /*goto*/ 0x2c)
	endloop(0x0a)

	label(0x2c)
	set_object_flag(OBJ_HANGARLIFT_JO, OBJFLAG_DEACTIVATED)
	unset_object_flag(OBJ_HANGARLIFT_ELVIS, OBJFLAG_DEACTIVATED)
	if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c)
	if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c)
	set_ailist(CHR_ELVIS, GAILIST_STOP_AND_IDLE)
	yield

#if VERSION >= VERSION_NTSC_1_0
	if_chr_y(CHR_ELVIS, 400, OPERATOR_LESS_THAN, /*goto*/ 0x06)
	goto_next(0x2c)

	// Warp Elvis to his lift
	label(0x06)

	beginloop(0x5c)
		chr_move_to_pad(CHR_ELVIS, PAD_LEE_00AD, FALSE, /*goto*/ 0x2c)
		chr_move_to_pad(CHR_ELVIS, PAD_LEE_01E6, FALSE, /*goto*/ 0x2c)
		chr_move_to_pad(CHR_ELVIS, PAD_LEE_01E7, FALSE, /*goto*/ 0x2c)
	endloop(0x5c)

	// Activate his lift and wait 2 seconds
	label(0x2c)
	unset_object_flag(OBJ_HANGARLIFT_ELVIS, OBJFLAG_DEACTIVATED)
#else
	chr_move_to_pad(CHR_ELVIS, PAD_LEE_00AD, FALSE, /*goto*/ 0x2c)
	label(0x2c)
#endif

	restart_timer

	beginloop(0x0b)
		if_timer_gt(VERSION >= VERSION_NTSC_1_0 ? 120 : 60, /*goto*/ 0x0c)
	endloop(0x0b)

	// Wait for lift to stop at top
	beginloop(0x0c)
		if_lift_stationary(OBJ_HANGARLIFT_ELVIS, /*goto*/ 0x2c)
	endloop(0x0c)

	label(0x2c)
	if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c)
	if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c)
	set_ailist(CHR_ELVIS, AILIST_ELVIS_FOLLOW)
	label(0x2c)

	// Check Elvis actually rode the lift up, and if not then go into a loop
	// attempting to warp him.
#if VERSION >= VERSION_NTSC_1_0
	beginloop(LABEL_64)
		set_object_flag(OBJ_HANGARLIFT_ELVIS, OBJFLAG_DEACTIVATED)
		unset_object_flag(0x3b, OBJFLAG_CANNOT_ACTIVATE)
		unset_object_flag(0x3c, OBJFLAG_CANNOT_ACTIVATE)
		unset_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP)
		if_chr_y(CHR_ELVIS, 400, OPERATOR_LESS_THAN, /*goto*/ 0x06)
		goto_next(LABEL_68)

		// Handle case where Elvis is still in the hangar for some reason
		label(0x06)
		set_ailist(CHR_ELVIS, AILIST_SET_CLOAKED)

		beginloop(LABEL_6D)
			chr_move_to_pad(CHR_ELVIS, PAD_LEE_0012, TRUE, /*goto*/ 0x2c)
		endloop(LABEL_6D)

		label(0x2c)
		set_ailist(CHR_ELVIS, AILIST_SET_UNCLOAKED)
	endloop(LABEL_64)
#else
	label(LABEL_64)
	set_object_flag(OBJ_HANGARLIFT_ELVIS, OBJFLAG_DEACTIVATED)
	unset_object_flag(0x3b, OBJFLAG_CANNOT_ACTIVATE)
	unset_object_flag(0x3c, OBJFLAG_CANNOT_ACTIVATE)
	unset_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP)
#endif

	// Elvis is at top now
	// For buddy or counterop who might still be in the hangar,
	// wait for lift to be called from hangar
	beginloop(LABEL_68)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_activated_object(CHR_P1P2, 0x3b, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x3c, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_ANTI, 0x3b, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_ANTI, 0x3c, /*goto*/ 0x2c)
	endloop(LABEL_68)

	// Bring Elvis's lift down
	label(0x2c)
	play_sound(SFX_81A6, -1)
	unset_object_flag(OBJ_HANGARLIFT_ELVIS, OBJFLAG_DEACTIVATED)
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield

	// Wait for it to arrive at bottom
	beginloop(LABEL_69)
		if_lift_stationary(OBJ_HANGARLIFT_ELVIS, /*goto*/ 0x2c)
	endloop(LABEL_69)

	// Wait for lift to be moving again (upwards)
	label(0x2c)

	beginloop(LABEL_6A)
		if_lift_stationary(OBJ_HANGARLIFT_ELVIS, /*goto*/ 0x06)
		goto_next(0x2c)

		label(0x06)
	endloop(LABEL_6A)

	label(0x2c)
	yield
	yield
	yield
	yield

	// Wait for lift stopped at top
	beginloop(LABEL_6B)
		if_lift_stationary(OBJ_HANGARLIFT_ELVIS, /*goto*/ 0x2c)
	endloop(LABEL_6B)

	// Go back to waiting for lift to be called from hangar
	label(0x2c)
	goto_first(LABEL_64)

	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0407_init_knifeable_skedar[] = {
	add_health_or_armor(160)
	set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
	set_self_chrflag(CHRCFLAG_NEVERSLEEP)
	set_ailist(CHR_SELF, AILIST_KNIFEABLE_SKEDAR)
	endlist
};

u8 func0408_knifeable_skedar[] = {
	set_shotlist(AILIST_KNIFEABLE_SKEDAR)
	if_just_injured(CHR_SELF, /*goto*/ 0x0c)
	label(0x08)
	yield
	label(0x2c)
	restart_timer
	set_target_chr(CHR_CASS)
	try_face_entity(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x04)

	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_stage_flag_eq(STAGEFLAG_CASS_AT_PAD, TRUE, /*goto*/ 0x06)
		set_target_chr(CHR_P1P2)
		if_can_see_target(/*goto*/ 0x0c)
		set_target_chr(CHR_CASS)
		if_just_injured(CHR_SELF, /*goto*/ 0x0c)
	endloop(0x04)

	// Cass at pad - wait 2 seconds
	label(0x06)
	restart_timer

	beginloop(0x09)
		if_timer_gt(120, /*goto*/ 0x2c)
	endloop(0x09)

	// Move to spot where Cass dies
	label(0x2c)
	set_target_chr(CHR_P1P2)
	jog_to_pad(PAD_LEE_00DD)

	beginloop(0x0a)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_chr_stopped(/*goto*/ 0x06)
		if_can_see_target(/*goto*/ 0x0c)
		if_just_injured(CHR_SELF, /*goto*/ 0x0c)
	endloop(0x0a)

	// Face away from player and wait 10 seconds
	label(0x06)
	restart_timer
	set_target_chr(CHR_CASS)
	try_face_entity(ATTACKFLAG_AIMATPAD, 0x00ef, /*goto*/ 0x0b)

	beginloop(0x0b)
		chr_toggle_p1p2(CHR_SELF)
		if_timer_gt(600, /*goto*/ 0x06)
		set_target_chr(CHR_P1P2)
		if_can_see_target(/*goto*/ 0x0c)
		if_just_injured(CHR_SELF, /*goto*/ 0x0c)
		set_target_chr(CHR_CASS)
	endloop(0x0b)

	// Go to holding cell
	label(0x06)
	set_view_distance(100)
	jog_to_pad(PAD_LEE_00D9)

	beginloop(0x0a)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_just_injured(CHR_SELF, /*goto*/ 0x0c)
		dprint 'W','A','I','T','I','N','G',' ','T','W','O','\n',0,
		if_chr_stopped(/*goto*/ 0x0d)
		label(0x06)
		if_can_see_target(/*goto*/ 0x0c)
		label(0x2c)
	endloop(0x0a)

	// Saw player or got injured
	label(0x0c)
	set_returnlist(CHR_SELF, GAILIST_UNALERTED)
	set_ailist(CHR_SELF, GAILIST_UNALERTED)

	// Arrived at cell - wait 20 seconds
	label(0x0d)
	restart_timer

	beginloop(0x0e)
		if_timer_gt(1200, /*goto*/ 0x2c)
	endloop(0x0e)

	// Go back to Cass spot
	label(0x2c)
	jog_to_pad(PAD_LEE_00DD)

	beginloop(0x0f)
		if_chr_stopped(/*goto*/ 0x2c)
	endloop(0x0f)

	// Become idle
	label(0x2c)
	stop_chr
	set_returnlist(CHR_SELF, GAILIST_UNALERTED)
	set_ailist(CHR_SELF, GAILIST_UNALERTED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * Door is the second door. The one to the main room.
 */
u8 func1009_keep_door_open_in_intro[] = {
	beginloop(LABEL_C2)
		if_stage_flag_eq(STAGEFLAG_INTRO_FINISHED, TRUE, /*goto*/ 0x06)
		if_door_state(0x17, (DOORSTATE_CLOSED | DOORSTATE_CLOSING), /*goto*/ 0x2c)
		reloop(LABEL_C2)

		// Door closed
		label(0x2c)
		open_door(0x17)
	endloop(LABEL_C2)

	// Intro finished
	label(0x06)
	yield
	yield

	beginloop(0x04)
		if_door_state(0x17, DOORSTATE_CLOSING, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	set_chr_flag_bankx(CHR_KNIFEABLE_SKEDAR, CHRFLAG0_SKIPSAFETYCHECKS, BANK_0)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

#define init_path(pathid) \
	set_accuracy(VERSION >= VERSION_NTSC_1_0 ? 20 : 40) \
	set_reaction_speed(75) \
	set_chr_maxdamage(CHR_SELF, 10) \
	add_health_or_armor(190) \
	set_recovery_speed(0) \
	set_shield(0) \
	assign_path(pathid) \
	start_patrol \
	set_ailist(CHR_SELF, GAILIST_RELATED_TO_SPAWNING)

u8 func0401_start_path00[] = {
	init_path(0)
	endlist
};

u8 func0402_start_path01[] = {
	init_path(1)
	endlist
};

u8 func0403_start_path02[] = {
	init_path(2)
	endlist
};

u8 func0404_start_path03[] = {
	init_path(3)
	endlist
};

u8 func0405_start_path04[] = {
	init_path(4)
	endlist
};

u8 func0406_start_path05[] = {
	init_path(5)
	endlist
};

u8 func0412_hangarspawner[] = {
	set_chr_chrflag(CHR_SELF, CHRCFLAG_KILLCOUNTABLE)
	set_self_chrflag(CHRCFLAG_CLONEABLE)
	set_self_chrflag(CHRCFLAG_HIDDEN)
	set_self_chrflag(CHRCFLAG_NEVERSLEEP)
	set_morale(0)

	beginloop(LABEL_C2)
		if_stage_flag_eq(STAGEFLAG_HANGAR_ALARM_ACTIVATED, TRUE, /*goto*/ 0x04)
	endloop(LABEL_C2)

	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_HANGAR_KILLS_DONE, FALSE, /*goto*/ 0x2c)
		yield
		yield
		yield
		yield
		yield
		goto_next(0x08)

		// Still killing
		label(0x2c)
		if_never_been_onscreen(/*goto*/ 0x4d)
		if_los_to_target(/*goto*/ 0x08)
		reloop(0x04)

		// Seen player, or kills done
		label(0x08)
		unset_self_chrflag(CHRCFLAG_HIDDEN)
		set_ailist(CHR_SELF, AILIST_HANGARCLONE)

		// chrflag3_00000008 was unset
		label(0x4d)
		if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4d)
		reloop(0x04)

		// Clone dead
		label(0x4d)
		try_spawn_clone2(CHR_SELF, AILIST_INIT_HANGARCLONE, 0, /*goto*/ 0x2c)
		set_ailist(CHR_SELF, AILIST_HANGARCLONE)
		label(0x2c)
		add_morale(1)
		yield
	endloop(0x04)

	endlist
};

u8 func0413_init_hangarclone[] = {
	set_chr_chrflag(CHR_SELF, CHRCFLAG_KILLCOUNTABLE)
	set_chr_hiddenflag(CHR_SELF, CHRHFLAG_BASICGUARD)
	set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
	label(0x04)
	rebuild_teams
	rebuild_squadrons
	try_inherit_properties(0x07, /*goto*/ 0x06)
	label(0x06)
	set_ailist(CHR_SELF, AILIST_HANGARCLONE)
	endlist
};

u8 func0414_hangarclone[] = {
	set_chr_chrflag(CHR_SELF, CHRCFLAG_KILLCOUNTABLE)
	run_to_pad(PAD_LEE_00B4)
	set_returnlist(CHR_SELF, AILIST_HANGARCLONE)

	beginloop(0x03)
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x2c)
	endloop(0x03)

	label(0x2c)
	set_shotlist(AILIST_HANGARCLONE)
	set_returnlist(CHR_SELF, AILIST_HANGARCLONE)
	set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)
	endlist
};

u8 func0419_hangar_maian[] = {
	set_shotlist(AILIST_HANGAR_MAIAN)
	set_self_chrflag(CHRCFLAG_NOAUTOAIM)
	if_chr_dead(CHR_SELF, /*goto*/ 0x2c)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c)
	goto_next(0x06)

	label(0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x06)
	if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)

	// @bug: Shoddy programming here. The jump to label 0x06 is likely supposed
	// to go to the label 0x06 just prior to "AT PAD", but that is not the next
	// label from here. Also, GOPOSFLAG_RUN will always be used because GOPOSFLAG_JOG
	// lacks a goto_next 0x04.
	if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x06)

	// Distance to pad >= 200
	label(0x03)
	restart_timer
	if_chr_distance_to_pad_gt(CHR_SELF, 500, PAD_PRESET, /*goto*/ 0x06)
	go_to_target_pad(GOPOSFLAG_JOG)

	// Intended: Distance to pad > 500
	// Actual: Always executes
	label(0x06)
	go_to_target_pad(GOPOSFLAG_RUN)

	beginloop(0x04)
		dprint 'G','O',' ','T','O',' ','P','A','D','\n',0,
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
		if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_PRESET, /*goto*/ 0x06)
		if_timer_gt(60, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	goto_first(0x03)

	// Distance to pad < 200
	label(0x06)
	stop_chr

	// Wait at pad for enemy
	beginloop(0x09)
		dprint 'A','T',' ','P','A','D','\n',0,
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08)
		if_chr_distance_to_pad_gt(CHR_SELF, 300, PAD_PRESET, /*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	goto_first(0x03)

	// Enemy detected
	label(0x08)
	dprint 'D','E','T','E','C','T','E','D','\n',0,
	set_returnlist(CHR_SELF, AILIST_HANGAR_MAIAN)
	set_shotlist(AILIST_HANGAR_MAIAN)
	set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)

	// Everything below here is unreachable
	label(LABEL_B5)
	jog_to_pad(PAD_LEE_0034)

	beginloop(0x0f)
		if_chr_stopped(/*goto*/ 0x2c)
	endloop(0x0f)

	label(0x2c)
	restart_timer
	chr_do_animation(ANIM_SNEEZE, 0, 193, 0, 16, CHR_SELF, 2)

	beginloop(0x10)
		if_timer_gt(180, /*goto*/ 0x06)
	endloop(0x10)

	label(0x06)
	show_hudmsg(CHR_BOND, L_LEE_013) // "Navigational information has been retrieved."
	set_stage_flag(STAGEFLAG_NAVIGATION_ROOM_DONE)
	goto_first(0x03)

	endlist
};

u8 func0418_init_hangar_maian[] = {
	set_self_chrflag(CHRCFLAG_HIDDEN)
	set_self_chrflag(CHRCFLAG_NEVERSLEEP)

	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_TRIGGER_HANGAR_MAIANS, TRUE, /*goto*/ 0x06)
	endloop(0x04)

	label(0x06)
	unset_self_chrflag(CHRCFLAG_HIDDEN)
	add_health_or_armor(200)
	set_reaction_speed(100)
	set_ailist(CHR_SELF, AILIST_HANGAR_MAIAN)
	endlist
};

u8 func100a_check_hangar_kills_done[] = {
	yield
	beginloop(LABEL_C2)
		if_stage_flag_eq(STAGEFLAG_MET_ELVIS, TRUE, /*goto*/ 0x2c)
	endloop(LABEL_C2)

	label(0x2c)
	restart_timer

	// Wait 2 minutes, or:
	// A = 6 kills
	// SA = 8 kills
	// PA = 10 kills
	beginloop(0x04)
		if_timer_gt(7200, /*goto*/ 0x2c)
		if_difficulty_lt(DIFF_SA, /*goto*/ LABEL_65)
		if_difficulty_lt(DIFF_PA, /*goto*/ LABEL_66)

		// PA
		if_kill_count_gt(9, /*goto*/ 0x2c)
		reloop(0x04)

		// A
		label(LABEL_65)
		if_kill_count_gt(5, /*goto*/ 0x2c)
		reloop(0x04)

		// SA
		label(LABEL_66)
		if_kill_count_gt(7, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	set_stage_flag(STAGEFLAG_HANGAR_KILLS_DONE)
	set_ailist(CHR_ELVIS, AILIST_ELVIS_GO_TO_HANGAR_LIFT)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100b_msg_getshieldsdown[] = {
	restart_timer

	beginloop(0x08)
		if_stage_flag_eq(STAGEFLAG_INTRO_FINISHED, TRUE, /*goto*/ 0x2c)
	endloop(0x08)

	label(0x2c)
	restart_timer

	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_CASS_SCREAMING, TRUE, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	restart_timer

	beginloop(LABEL_C2)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(LABEL_C2)

	label(0x06)
	speak(CHR_BOND, L_LEE_016, SFX_81A0, CHANNEL_6, COLOR_04_ORANGE) // "Outside, Joanna. Get the shields down and we can h..."
	set_stage_flag(STAGEFLAG_SAID_GETSHIELDSDOWN)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100c_engineroom[] = {
	set_lights_state(0x0067, LIGHTOP_SINELOOP, 70, 255, 250)

	// Wait until both engines destroyed
	beginloop(0x04)
		if_object_in_good_condition(OBJ_ENGINE1, /*goto*/ 0x2c)
		if_object_in_good_condition(OBJ_ENGINE2, /*goto*/ 0x2c)
		goto_next(0x06)

		label(0x2c)
	endloop(0x04)

	label(0x06)
	if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c)
	if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c)
	set_ailist(CHR_ELVIS, AILIST_ELVIS_RUN_FROM_ENGINEROOM)
	play_x_track(XREASON_DEFAULT, 10, 10)
	speak(CHR_BOND, L_LEE_046, MP3_03D7, CHANNEL_6, COLOR_04_ORANGE) // "We have to get out of here!"
	label(0x2c)
	set_countdown_timer(10)
	show_countdown_timer
	start_countdown_timer

	beginloop(LABEL_65)
		if_countdown_timer_lt(1, /*goto*/ 0x2c)
	endloop(LABEL_65)

	// Timer expired
	label(0x2c)
	unset_object_flag(0x1b, OBJFLAG_INVINCIBLE)
	unset_object_flag(0x1c, OBJFLAG_INVINCIBLE)
	unset_object_flag(0x1d, OBJFLAG_INVINCIBLE)
	unset_object_flag(0x1e, OBJFLAG_INVINCIBLE)
	unset_object_flag(0x1f, OBJFLAG_INVINCIBLE)
	unset_object_flag(0x20, OBJFLAG_INVINCIBLE)
	set_object_flag2(0x1b, OBJFLAG2_GLASS_80000000)
	set_object_flag2(0x1c, OBJFLAG2_GLASS_80000000)
	set_object_flag2(0x1d, OBJFLAG2_GLASS_80000000)
	set_object_flag2(0x1e, OBJFLAG2_GLASS_80000000)
	set_object_flag2(0x1f, OBJFLAG2_GLASS_80000000)
	set_object_flag2(0x20, OBJFLAG2_GLASS_80000000)
	label(0x06)
	hide_countdown_timer
	unset_object_flag(0x21, OBJFLAG_INVINCIBLE)
	destroy_object(0x21)
	destroy_object(0x1b)
	destroy_object(0x1c)
	destroy_object(0x1d)
	destroy_object(0x1e)
	destroy_object(0x1f)
	destroy_object(0x20)
	show_hudmsg(CHR_BOND, L_LEE_023) // "Engines have been disabled."
	set_stage_flag(STAGEFLAG_ENGINES_DESTROYED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * This is the lift BEFORE the bridge lift.
 *
 * The lift moves automatically until you ride it up, then it stays at the top
 * unless called from below.
 */
u8 func100d_prebridgelift[] = {
	// Wait until Y >= 2600
	beginloop(0x09)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_y(CHR_P1P2, 2600, OPERATOR_LESS_THAN, /*goto*/ 0x2c)
		goto_next(0x0a)

		label(0x2c)
	endloop(0x09)

	// Wait until lift stopped at top
	beginloop(0x0a)
		if_lift_stationary(OBJ_PREBRIDGELIFT, /*goto*/ 0x2c)
	endloop(0x0a)

	// Deactivate lift
	label(0x2c)
	label(LABEL_64)
	set_object_flag(OBJ_PREBRIDGELIFT, OBJFLAG_DEACTIVATED)
	unset_object_flag(0x3d, OBJFLAG_CANNOT_ACTIVATE)
	unset_object_flag(0x3e, OBJFLAG_CANNOT_ACTIVATE)

	// Wait until lift called at bottom by buddy or counterop
	beginloop(LABEL_68)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_activated_object(CHR_P1P2, 0x3d, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x3e, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_ANTI, 0x3d, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_ANTI, 0x3e, /*goto*/ 0x2c)
	endloop(LABEL_68)

	// Activate lift
	label(0x2c)
	play_sound(SFX_81A6, -1)
	unset_object_flag(OBJ_PREBRIDGELIFT, OBJFLAG_DEACTIVATED)
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield

	// Wait until stopped at bottom
	beginloop(LABEL_69)
		if_lift_stationary(OBJ_PREBRIDGELIFT, /*goto*/ 0x2c)
	endloop(LABEL_69)

	label(0x2c)

	// Wait until moving (upwards)
	beginloop(LABEL_6A)
		if_lift_stationary(OBJ_PREBRIDGELIFT, /*goto*/ 0x06)
		goto_next(0x2c)

		label(0x06)
	endloop(LABEL_6A)

	label(0x2c)
	yield
	yield
	yield
	yield

	// Wait until stopped at top
	beginloop(LABEL_6B)
		if_lift_stationary(OBJ_PREBRIDGELIFT, /*goto*/ 0x2c)
	endloop(LABEL_6B)

	label(0x2c)
	goto_first(LABEL_64)

	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100e_bridgelift[] = {
	// Wait until Y >= 3600
	beginloop(0x09)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_y(CHR_P1P2, 3600, OPERATOR_LESS_THAN, /*goto*/ 0x2c)
		goto_next(0x0a)

		label(0x2c)
	endloop(0x09)

	// Wait until lift stopped at top
	beginloop(0x0a)
		if_lift_stationary(OBJ_BRIDGELIFT, /*goto*/ 0x2c)
	endloop(0x0a)

	label(0x2c)
	set_stage_flag(STAGEFLAG_ENTERED_BRIDGE)

	// Deactive lift
	label(LABEL_64)
	set_object_flag(OBJ_BRIDGELIFT, OBJFLAG_DEACTIVATED)
	unset_object_flag(0x2f, OBJFLAG_CANNOT_ACTIVATE)
	unset_object_flag(0x30, OBJFLAG_CANNOT_ACTIVATE)

	// Wait until lift called from below by buddy or counterop
	beginloop(LABEL_68)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_activated_object(CHR_P1P2, 0x2f, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x30, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_ANTI, 0x2f, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_ANTI, 0x30, /*goto*/ 0x2c)
	endloop(LABEL_68)

	// Activate lift
	label(0x2c)
	play_sound(SFX_81A6, -1)
	unset_object_flag(OBJ_BRIDGELIFT, OBJFLAG_DEACTIVATED)
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield
	yield

	// Wait until lift stopped
	beginloop(LABEL_69)
		if_lift_stationary(OBJ_BRIDGELIFT, /*goto*/ 0x2c)
	endloop(LABEL_69)

	label(0x2c)

	// Wait until lift moving again (upwards)
	beginloop(LABEL_6A)
		if_lift_stationary(OBJ_BRIDGELIFT, /*goto*/ 0x06)
		goto_next(0x2c)

		label(0x06)
	endloop(LABEL_6A)

	label(0x2c)
	yield
	yield
	yield
	yield

	// Wait until lift stopped at top
	beginloop(LABEL_6B)
		if_lift_stationary(OBJ_BRIDGELIFT, /*goto*/ 0x2c)
	endloop(LABEL_6B)

	label(0x2c)
	goto_first(LABEL_64)

	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * Assigned to the two Skedar behind the bridge doors who must be killed to end
 * the level.
 */
u8 func0415_bridgespawner[] = {
	set_accuracy(VERSION >= VERSION_NTSC_1_0 ? 20 : 40)
	set_reaction_speed(75)
	set_chr_maxdamage(CHR_SELF, 10)
	add_health_or_armor(190)
	set_recovery_speed(0)
	set_shield(0)
	set_chr_chrflag(CHR_SELF, CHRCFLAG_KILLCOUNTABLE)
	set_self_chrflag(CHRCFLAG_CLONEABLE)
	set_self_chrflag(CHRCFLAG_HIDDEN)
	set_chr_cloaked(CHR_SELF, TRUE, FALSE)
	set_self_chrflag(CHRCFLAG_NEVERSLEEP)
	set_morale(0)

	beginloop(LABEL_C2)
		if_stage_flag_eq(STAGEFLAG_TRIGGER_BRIDGE_SPAWNING, TRUE, /*goto*/ 0x04)
	endloop(LABEL_C2)

	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_BRIDGE_DOORS_UNLOCKED, TRUE, /*goto*/ 0x06)
		if_morale_lt(2, /*goto*/ 0x2c)

		// Doors are unlocked (have been spawning for over a minute)
		label(0x06)
		restart_timer

		beginloop(LABEL_65)
			if_timer_gt(60, /*goto*/ 0x06)
		endloop(LABEL_65)

		label(0x06)
		goto_next(0x08)

		// morale is 0 or 1
		label(0x2c)
		if_never_been_onscreen(/*goto*/ 0x4d)
		if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x2c)
		if_chr_dead(CHR_CLONE, /*goto*/ 0x2c)
		if_chr_knockedout(CHR_CLONE, /*goto*/ 0x2c)
		label(0x2c)
		if_los_to_target(/*goto*/ 0x08)
	endloop(0x04)

	// Been spawning for 61 seconds, or Skedar can see player
	// Unhide and uncloak
	label(0x08)
	unset_self_chrflag(CHRCFLAG_HIDDEN)
	yield
	set_chr_cloaked(CHR_SELF, FALSE, TRUE)
	set_ailist(CHR_SELF, AILIST_INIT_BRIDGESPAWNER_REVEAL)

	// chrflag3_00000008 was unset
	// 1 in 256 chance of spawning on any given frame (or script invocation?)
	// or after 5 seconds just spawn one anyway.
	label(0x4d)
	restart_timer

	beginloop(0x10)
		call_rng
		if_timer_gt(300, /*goto*/ 0x2c)
		if_rand_lt(1, /*goto*/ 0x2c)
	endloop(0x10)

	// Check clone is dead
	label(0x2c)
	if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4d)
	if_chr_dead(CHR_CLONE, /*goto*/ 0x4d)
	if_chr_knockedout(CHR_CLONE, /*goto*/ 0x4d)
	goto_first(0x04)

	// Spawn
	label(0x4d)
	try_spawn_clone2(CHR_SELF, AILIST_INIT_BRIDGECLONE, 0, /*goto*/ 0x2c)
	unset_self_chrflag(CHRCFLAG_HIDDEN)
	yield
	set_chr_cloaked(CHR_SELF, FALSE, TRUE)
	set_ailist(CHR_SELF, AILIST_INIT_BRIDGESPAWNER_REVEAL)

	label(0x2c)
	add_morale(1)
	yield
	goto_first(0x04)

	endlist
};

u8 func0416_init_bridgeclone[] = {
	set_chr_cloaked(CHR_SELF, FALSE, TRUE)
	set_chr_hiddenflag(CHR_SELF, CHRHFLAG_BASICGUARD)
	set_accuracy(VERSION >= VERSION_NTSC_1_0 ? 20 : 40)
	set_reaction_speed(75)
	set_chr_maxdamage(CHR_SELF, 10)
	add_health_or_armor(190)
	set_recovery_speed(0)
	set_shield(0)
	set_chr_chrflag(CHR_SELF, CHRCFLAG_KILLCOUNTABLE)
	set_self_flag_bankx(CHRFLAG1_NOIDLEANIMS, BANK_1)
	label(0x04)
	rebuild_teams
	rebuild_squadrons

	if_self_flag_bankx_eq(CHRFLAG0_GP1, TRUE, BANK_0, /*goto*/ 0x2c)
	try_inherit_properties(CHR_BRIDGESPAWNER1, /*goto*/ 0x06)

	label(0x06)
	goto_next(0x06)

	label(0x2c)
	try_inherit_properties(CHR_BRIDGESPAWNER2, /*goto*/ 0x06)

	label(0x06)
	add_health_or_armor(40)
	set_ailist(CHR_SELF, AILIST_BRIDGECLONE)
	endlist
};

/**
 * Assigned to the two bridge spawners when they stop sending clones and reveal
 * themselves. Kill count isn't actually used to check if they're dead, so this
 * function isn't necessary.
 */
u8 func0417_init_spawner_reveal[] = {
	set_chr_chrflag(CHR_SELF, CHRCFLAG_KILLCOUNTABLE)
	set_ailist(CHR_SELF, AILIST_BRIDGECLONE)
	endlist
};

u8 func041a_bridgeclone[] = {
	set_shotlist(AILIST_BRIDGECLONE)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c)
	if_chr_dead(CHR_SELF, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c)
	goto_next(0x06)

	// Dying
	label(0x2c)
	set_shotlist(GAILIST_IDLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Alive
	label(0x06)
	set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00020000)
	if_self_flag_bankx_eq(CHRFLAG0_GP1, TRUE, BANK_0, /*goto*/ 0x2c)
	set_target_chr(CHR_ELVIS)
	goto_next(LABEL_C2)

	label(0x2c)
	call_rng
	if_rand_gt(128, /*goto*/ 0x2c)
	set_target_chr(CHR_COOP)
	if_chr_dead(CHR_COOP, /*goto*/ 0x2c)
	goto_next(LABEL_C2)

	label(0x2c)
	set_target_chr(CHR_BOND)
	label(0x03)

	beginloop(LABEL_C2)
		if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2c)
		if_chr_dead(CHR_TARGET, /*goto*/ 0x2c)
		if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2c)
		goto_next(0x06)

		label(0x2c)
		if_enemy_distance_lt_and_los(1000, /*goto*/ 0x06)
	endloop(LABEL_C2)

	// Has target - walk towards for 2 seconds
	label(0x06)
	if_distance_to_target_lt(150, /*goto*/ 0x2e)
	label(LABEL_C5)
	restart_timer
	try_walk_to_target(/*goto*/ 0x08)

	beginloop(0x08)
		if_chr_dead(CHR_SELF, /*goto*/ LABEL_B8)
		if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10)
		if_chr_dead(CHR_TARGET, /*goto*/ 0x10)
		if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10)
		if_timer_gt(120, /*goto*/ 0x09)
	endloop(0x08)

	label(0x09)
	restart_timer
	try_run_to_target(/*goto*/ 0x0a)

	// Start running
	beginloop(0x0a)
		if_chr_dead(CHR_SELF, /*goto*/ LABEL_B8)
		if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10)
		if_chr_dead(CHR_TARGET, /*goto*/ 0x10)
		if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10)
		if_target_moving_away(/*goto*/ 0x2c)
		if_distance_to_target_lt(150, /*goto*/ 0x2e)
		label(0x2c)
		if_distance_to_target_lt(50, /*goto*/ 0x2e)
		if_timer_gt(14, /*goto*/ 0x06)
	endloop(0x0a)

	label(0x06)
	goto_first(0x09)

	// Close to target - face them
	label(0x2e)
	restart_timer
	dprint 'F','A','C','E',' ','T','A','R','G','E','T','\n',0,
	if_target_in_fov_left(10, /*goto*/ 0x06)
	if_target_out_of_fov_left(246, /*goto*/ 0x06)
	stop_chr
	try_face_entity(ATTACKFLAG_AIMATTARGET, 1, /*goto*/ 0x0b)

	beginloop(0x0b)
		if_chr_dead(CHR_SELF, /*goto*/ LABEL_B8)
		if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10)
		if_chr_dead(CHR_TARGET, /*goto*/ 0x10)
		if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10)
		if_target_in_fov_left(10, /*goto*/ 0x06)
		if_target_out_of_fov_left(246, /*goto*/ 0x06)
		if_timer_gt(15, /*goto*/ 0x06)
	endloop(0x0b)

	// Attempt punch or kick
	label(0x06)
	try_punch_or_kick(/*goto*/ 0x2f)
	goto_first(0x03)

	beginloop(0x2f)
		if_chr_dead(CHR_SELF, /*goto*/ LABEL_B8)
		if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10)
		if_chr_dead(CHR_TARGET, /*goto*/ 0x10)
		if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x2f)

	// Attack finished
	label(0x06)
	goto_first(0x03)

	// Target chr dying
	label(0x10)
	stop_chr

	beginloop(0x0f)
		if_chr_dead(CHR_SELF, /*goto*/ LABEL_B8)
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x06)
	endloop(0x0f)

	label(0x06)
	goto_first(LABEL_C2)

	label(LABEL_B8)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100f_bridge_entry[] = {
	// Wait until 3 bridge Skedar dead
	beginloop(0x09)
		if_chr_dead(CHR_BRIDGE1, /*goto*/ 0x2c)
		if_chr_death_animation_finished(CHR_BRIDGE1, /*goto*/ 0x2c)
		if_chr_knockedout(CHR_BRIDGE1, /*goto*/ 0x2c)
		reloop(0x09)

		label(0x2c)
		if_chr_dead(CHR_BRIDGE2, /*goto*/ 0x2c)
		if_chr_death_animation_finished(CHR_BRIDGE2, /*goto*/ 0x2c)
		if_chr_knockedout(CHR_BRIDGE2, /*goto*/ 0x2c)
		reloop(0x09)

		label(0x2c)
		if_chr_dead(CHR_BRIDGE3, /*goto*/ 0x2c)
		if_chr_death_animation_finished(CHR_BRIDGE3, /*goto*/ 0x2c)
		if_chr_knockedout(CHR_BRIDGE3, /*goto*/ 0x2c)
	endloop(0x09)

	label(0x2c)
	label(0x2c)
	label(0x06)
	restart_timer

	// Wait 11.66 seconds
	beginloop(0x0a)
		if_timer_gt(700, /*goto*/ 0x06)
	endloop(0x0a)

	label(0x06)
	set_stage_flag(STAGEFLAG_ELVIS_COMING_TO_BRIDGE)
	set_ailist(CHR_ELVIS, GAILIST_STOP_AND_IDLE)
	yield
	if_chr_y(CHR_ELVIS, 3500, OPERATOR_LESS_THAN, /*goto*/ LABEL_65)
	goto_next(0x2c)

	// Elvis is somewhere below - warp him up
	beginloop(LABEL_65)
		chr_move_to_pad(CHR_ELVIS, PAD_LEE_00A7, TRUE, /*goto*/ 0x2c)
	endloop(LABEL_65)

	label(0x2c)
	set_ailist(CHR_ELVIS, AILIST_ELVIS_AT_BRIDGE)
	restart_timer

	// Wait another 11.66 seconds
	beginloop(0x08)
		if_timer_gt(700, /*goto*/ 0x06)
	endloop(0x08)

	label(0x06)
	set_stage_flag(STAGEFLAG_TRIGGER_BRIDGE_SPAWNING)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1010_check_bridge_captured[] = {
	beginloop(LABEL_C2)
		if_stage_flag_eq(STAGEFLAG_TRIGGER_BRIDGE_SPAWNING, TRUE, /*goto*/ 0x2c)
	endloop(LABEL_C2)

	// Wait for 2 spawner skedar to be killed. If 60 seconds have passed,
	// unlock the bridge doors in case they've gotten stuck or became unalert
	// or something.
	label(0x2c)
	restart_timer

	beginloop(0x09)
		if_stage_flag_eq(STAGEFLAG_BRIDGE_DOORS_UNLOCKED, TRUE, /*goto*/ 0x2c)
		if_timer_gt(3600, /*goto*/ 0x0d)
		label(0x2c)
		if_chr_death_animation_finished(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c)
		if_chr_dead(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c)
		if_chr_knockedout(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c)
		reloop(0x09)

		label(0x2c)
		if_chr_death_animation_finished(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c)
		if_chr_dead(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c)
		if_chr_knockedout(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c)
	endloop(0x09)

	// 60 seconds elapsed
	label(0x0d)
	set_stage_flag(STAGEFLAG_BRIDGE_DOORS_UNLOCKED)
	unlock_door(0x46, 0x40)
	unlock_door(0x47, 0x40)
	unlock_door(0x48, 0x40)
	unlock_door(0x49, 0x40)
	goto_first(0x09)

	label(0x2c)
	show_hudmsg(CHR_BOND, L_LEE_025) // "Bridge has been captured."
	set_stage_flag(STAGEFLAG_BRIDGE_CAPTURED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1011_check_end_level[] = {
	beginloop(0x09)
		if_all_objectives_complete(/*goto*/ 0x06)
	endloop(0x09)

	label(0x06)
	restart_timer

	beginloop(0x08)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x08)

	label(0x06)
	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c)
	if_chr_dead(CHR_BOND, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c)
	goto_next(0x06)

	label(0x2c)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c)
	if_chr_dead(CHR_COOP, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c)
	goto_next(0x06)

	// Both players dead
	label(0x2c)
	end_level
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Either buddy is alive
	label(0x06)
	if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c)
	if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c)
	if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c)

	// Mission complete
	set_invincible(CHR_BOND)
	set_ailist(CHR_SELF, AILIST_OUTRO)

	// Elvis dead
	label(0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1003_intro[] = {
	set_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	play_cutscene_track(MUSIC_ATTACKSHIP_INTRO)
	camera_movement(ANIM_CUT_LEE_INTRO_CAM)
	cmd0175(60)

	set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LEE_INTRO_JO, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 4)

	set_chr_chrflag(CHR_CASS, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_CASS, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_CASS, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LEE_INTRO_CASS, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_CASS, 4)

	set_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_INTRO_SKEDAR, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LEE_INTRO_SKEDAR, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_INTRO_SKEDAR, 4)

	restart_timer
	set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE)
	yield
	set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE)

	#define wait_until(time, loopid) \
		beginloop(loopid) \
			if_controller_button_pressed(/*goto*/ LABEL_B0) \
			if_timer_gt(time, /*goto*/ 0x06) \
		endloop(loopid) \
		label(0x06)

	wait_until(60, LABEL_9A)
	play_sound(SFX_0171, CHANNEL_CUTSCENE)

	wait_until(120, LABEL_AC)
	play_sound(MP3_075A, CHANNEL_CUTSCENE)

	wait_until(136, LABEL_9B)
	play_sound(SFX_0172, CHANNEL_CUTSCENE)

	wait_until(186, LABEL_9C)
	play_sound(SFX_0173, CHANNEL_CUTSCENE)

	wait_until(226, LABEL_9D)
	play_sound(SFX_0174, CHANNEL_CUTSCENE)

	wait_until(320, LABEL_9E)
	speak(CHR_BOND, L_LEE_032, MP3_047F, CHANNEL_CUTSCENE, COLOR_09_BLUE) // "Oohhh... I'd better not be where I think I am."

	wait_until(505, LABEL_9F)
	play_sound(SFX_0427, CHANNEL_CUTSCENE)

	wait_until(600, LABEL_A0)
	speak(CHR_BOND, L_LEE_033, MP3_0480, CHANNEL_CUTSCENE, COLOR_04_ORANGE) // "And it's worse than that, my dear. Just look who y..."

	wait_until(1000, LABEL_A1)
	speak(CHR_BOND, L_LEE_034, MP3_0481, CHANNEL_CUTSCENE, COLOR_09_BLUE) // "You! I thought you'd managed to escape. We found n..."

	wait_until(1018, LABEL_A2)
	play_sound(SFX_0175, CHANNEL_CUTSCENE)

	wait_until(1142, LABEL_A3)
	play_sound(SFX_0176, CHANNEL_CUTSCENE)

	wait_until(1168, LABEL_A4)
	play_sound(SFX_0177, CHANNEL_CUTSCENE)

	wait_until(1210, LABEL_A5)
	play_sound(SFX_0178, CHANNEL_CUTSCENE)

	wait_until(1260, LABEL_A6)
	play_sound(SFX_0171, CHANNEL_CUTSCENE)

	wait_until(1298, LABEL_A7)
	play_sound(SFX_0172, CHANNEL_CUTSCENE)

	wait_until(1358, LABEL_65)
	play_sound(SFX_0173, CHANNEL_CUTSCENE)

	wait_until(1396, LABEL_66)
	play_sound(SFX_0172, CHANNEL_CUTSCENE)

	wait_until(1400, LABEL_A8)
	speak(CHR_BOND, L_LEE_035, MP3_0482, CHANNEL_CUTSCENE, COLOR_04_ORANGE) // "You couldn't find me. But there was no hiding from..."

	wait_until(1520, LABEL_67)
	play_sound(SFX_0176, CHANNEL_CUTSCENE)

	wait_until(1592, LABEL_68)
	play_sound(SFX_0177, CHANNEL_CUTSCENE)

	wait_until(1600, LABEL_69)
	play_sound(SFX_0174, CHANNEL_CUTSCENE)

	wait_until(1656, LABEL_6A)
	play_sound(SFX_0175, CHANNEL_CUTSCENE)

	wait_until(1728, LABEL_6B)
	play_sound(SFX_0178, CHANNEL_CUTSCENE)

	wait_until(1734, LABEL_6C)
	play_sound(SFX_0172, CHANNEL_CUTSCENE)

	wait_until(1770, LABEL_6E)
	play_sound(SFX_0173, CHANNEL_CUTSCENE)

	wait_until(1810, LABEL_61)
	open_door(0x17)
	play_sound(SFX_DOOR_801E, CHANNEL_CUTSCENE)
	play_sound(SFX_SKEDAR_ROAR_0530, CHANNEL_CUTSCENE)

	wait_until(1870, LABEL_6F)
	speak(CHR_BOND, L_LEE_036, MP3_0483, CHANNEL_CUTSCENE, COLOR_04_ORANGE) // "This is it. Wait there! I'll make a distraction; i..."

	wait_until(1874, LABEL_70)
	play_sound(SFX_0174, CHANNEL_CUTSCENE)

	wait_until(1930, LABEL_71)
	play_sound(SFX_0175, CHANNEL_CUTSCENE)

	wait_until(1986, LABEL_72)
	play_sound(SFX_05A2, CHANNEL_CUTSCENE)

	wait_until(2040, LABEL_73)
	play_sound(SFX_05A3, CHANNEL_CUTSCENE)

	wait_until(2108, LABEL_74)
	play_sound(SFX_05A2, CHANNEL_CUTSCENE)

	wait_until(2168, LABEL_75)
	play_sound(SFX_05A3, CHANNEL_CUTSCENE)

	wait_until(2226, LABEL_76)
	play_sound(SFX_SKEDAR_ROAR_0531, CHANNEL_CUTSCENE)

	wait_until(2232, LABEL_77)
	play_sound(SFX_05A2, CHANNEL_CUTSCENE)

	wait_until(2300, LABEL_62)
	close_door(0x17)

	wait_until(2346, LABEL_78)

	wait_until(2424, LABEL_79)
	play_sound(SFX_05A3, CHANNEL_CUTSCENE)

	wait_until(2468, LABEL_7A)
	play_sound(SFX_SKEDAR_ROAR_0530, CHANNEL_CUTSCENE)

	wait_until(2474, LABEL_7B)
	play_sound(SFX_05A2, CHANNEL_CUTSCENE)

	wait_until(2560, LABEL_7C)
	play_sound(SFX_0176, CHANNEL_CUTSCENE)

	wait_until(2580, LABEL_7D)
	play_sound(SFX_0177, CHANNEL_CUTSCENE)

	wait_until(2581, LABEL_7E)
	speak(CHR_BOND, L_LEE_037, MP3_0484, CHANNEL_CUTSCENE, COLOR_09_BLUE) // "Why are you doing this, Cassandra?"

	wait_until(2614, LABEL_7F)
	play_sound(SFX_0171, CHANNEL_CUTSCENE)

	wait_until(2648, LABEL_80)
	play_sound(SFX_0178, CHANNEL_CUTSCENE)

	wait_until(2670, LABEL_81)
	play_sound(SFX_0172, CHANNEL_CUTSCENE)

	wait_until(2708, LABEL_82)
	play_sound(SFX_0173, CHANNEL_CUTSCENE)

	wait_until(2736, LABEL_83)
	play_sound(SFX_0174, CHANNEL_CUTSCENE)

	wait_until(2780, LABEL_84)
	play_sound(SFX_0175, CHANNEL_CUTSCENE)

	wait_until(2790, LABEL_85)
	speak(CHR_BOND, L_LEE_038, MP3_0485, CHANNEL_CUTSCENE, COLOR_04_ORANGE) // "The Skedar used me, Joanna. You are my best chance..."

	wait_until(2792, LABEL_86)
	play_sound(SFX_0172, CHANNEL_CUTSCENE)

	wait_until(2834, LABEL_87)
	play_sound(SFX_0176, CHANNEL_CUTSCENE)

	wait_until(3016, LABEL_88)
	play_sound(SFX_01DC, CHANNEL_CUTSCENE)

	wait_until(3068, LABEL_89)
	play_sound(SFX_043A, CHANNEL_CUTSCENE)
	play_sound(SFX_043D, CHANNEL_CUTSCENE)

	wait_until(3186, LABEL_63)
	open_door(0x24)

	wait_until(3238, LABEL_8A)
	play_sound(SFX_0177, CHANNEL_CUTSCENE)

	wait_until(3258, LABEL_8B)
	play_sound(SFX_0172, CHANNEL_CUTSCENE)

	wait_until(3280, LABEL_8C)
	play_sound(SFX_0173, CHANNEL_CUTSCENE)
	close_door(0x24)

	wait_until(3313, LABEL_8D)
	play_sound(SFX_SKEDAR_ROAR_052A, CHANNEL_CUTSCENE)
	speak(CHR_BOND, L_LEE_039, MP3_0486, CHANNEL_CUTSCENE, COLOR_04_ORANGE) // "Eeeeaaarrrrggghhh!!!"

	beginloop(0x08)
		if_camera_animating(/*goto*/ 0x2c)
		goto_next(LABEL_B0)

		label(0x2c)
		if_controller_button_pressed(/*goto*/ LABEL_B0)
		label(0x2c)
	endloop(0x08)

	label(LABEL_B0)
	label(0x06)
	set_stage_flag(STAGEFLAG_INTRO_FINISHED)
	open_door(0x17)
	mute_channel(CHANNEL_CUTSCENE)
	unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LEE_INTRO_JO, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 2)

	unset_chr_chrflag(CHR_CASS, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_CASS, CHRHFLAG_00020000)
	set_chr_chrflag(CHR_CASS, CHRCFLAG_FORCETOGROUND)
	chr_do_animation(ANIM_CUT_LEE_INTRO_CASS, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_CASS, 2)

	unset_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_INTRO_SKEDAR, CHRHFLAG_00020000)
	set_chr_chrflag(CHR_INTRO_SKEDAR, CHRCFLAG_FORCETOGROUND)
	chr_do_animation(ANIM_CUT_LEE_INTRO_SKEDAR, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_INTRO_SKEDAR, 2)

	remove_chr(CHR_INTRO_SKEDAR)
	set_ailist(CHR_SHY_SKEDAR, AILIST_SHY_SKEDAR_WAIT)
	enter_firstperson
	yield
	chr_move_to_pad(CHR_CASS, PAD_LEE_00DF, TRUE, /*goto*/ 0x2c)
	label(0x2c)
	set_ailist(CHR_CASS, AILIST_CASS)
	stop_cutscene_track
	stop_ambient_track
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0c01_outro[] = {
	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c)
	set_target_chr(CHR_BOND)
	goto_next(0x06)

	label(0x2c)
	set_target_chr(CHR_COOP)
	label(0x06)
	disable_object(0x2c)
	camera_movement(ANIM_CUT_LEE_OUTRO_CAM)
	play_cutscene_track(MUSIC_ATTACKSHIP_OUTRO)
	set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_P1P2_OPPOSITE, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN)

	set_chr_chrflag(CHR_TARGET, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_TARGET, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_TARGET, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LEE_OUTRO_JO, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_TARGET, 4)

	set_chr_chrflag(CHR_ELVIS, CHRCFLAG_INVINCIBLE)
	set_ailist(CHR_ELVIS, GAILIST_IDLE)
	set_chr_chrflag(CHR_ELVIS, CHRCFLAG_UNPLAYABLE)
	unset_chr_chrflag(CHR_ELVIS, CHRCFLAG_HIDDEN)
	set_chr_hiddenflag(CHR_ELVIS, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_LEE_OUTRO_ELVIS, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_ELVIS, 4)

	enable_object(OBJ_OUTRO_SHUTTLE)
	set_object_flag2(OBJ_OUTRO_SHUTTLE, OBJFLAG2_CANFILLVIEWPORT)
	set_object_flag3(OBJ_OUTRO_SHUTTLE, OBJFLAG3_00000010)
	object_do_animation(ANIM_CUT_LEE_OUTRO_SKSHUTTLE, OBJ_OUTRO_SHUTTLE, 0x04, 0xffff)
	object_set_modelpart_visible(OBJ_OUTRO_SHUTTLE, MODELPART_SKSHUTTLE_GANGWAY, FALSE)

	show_nonessential_chrs(FALSE)
	restart_timer
	set_cutscene_weapon(CHR_TARGET, WEAPON_NONE, WEAPON_NONE)
	yield
	set_cutscene_weapon(CHR_TARGET, WEAPON_NONE, WEAPON_NONE)
	set_cutscene_weapon(CHR_ELVIS, WEAPON_NONE, WEAPON_NONE)
	yield
	set_cutscene_weapon(CHR_ELVIS, WEAPON_NONE, WEAPON_NONE)

	wait_until(38, LABEL_65)
	play_sound(SFX_00F9, CHANNEL_CUTSCENE)

	wait_until(140, LABEL_66)
	play_sound(SFX_00FD, CHANNEL_CUTSCENE)

	wait_until(150, LABEL_A9)
	speak(CHR_BOND, L_LEE_040, MP3_0487, CHANNEL_CUTSCENE, COLOR_09_BLUE) // "Wow. That's the first time I've seen another plane..."

	wait_until(368, LABEL_67)
	play_sound(SFX_00FA, CHANNEL_CUTSCENE)
	play_sound(SFX_00FB, CHANNEL_CUTSCENE)

	wait_until(540, LABEL_69)
	play_sound(SFX_00FE, CHANNEL_CUTSCENE)

	wait_until(550, LABEL_6B)
	play_sound(SFX_00FC, CHANNEL_CUTSCENE)

	wait_until(580, LABEL_6C)
	play_sound(SFX_00F9, CHANNEL_CUTSCENE)
	play_sound(SFX_00FB, CHANNEL_CUTSCENE)

	wait_until(690, LABEL_6E)
	speak(CHR_BOND, L_LEE_041, MP3_0488, CHANNEL_CUTSCENE, COLOR_04_ORANGE) // "Hmmmm?"

	wait_until(850, LABEL_6F)
	speak(CHR_BOND, L_LEE_042, MP3_0489, CHANNEL_CUTSCENE, COLOR_04_ORANGE) // "I don't... I don't believe it!"

	wait_until(963, LABEL_70)
	play_sound(SFX_FOOTSTEP_80D4, CHANNEL_CUTSCENE)

	wait_until(972, LABEL_71)
	play_sound(SFX_FOOTSTEP_80D8, CHANNEL_CUTSCENE)

	wait_until(988, LABEL_61)
	play_sound(SFX_FOOTSTEP_80DB, CHANNEL_CUTSCENE)

	wait_until(1000, LABEL_72)
	speak(CHR_BOND, L_LEE_043, MP3_048A, CHANNEL_CUTSCENE, COLOR_09_BLUE) // "Elvis? What is it?"

	wait_until(1030, LABEL_73)
	play_sound(SFX_FOOTSTEP_80DA, CHANNEL_CUTSCENE)

	wait_until(1045, LABEL_74)
	play_sound(SFX_FOOTSTEP_80D8, CHANNEL_CUTSCENE)

	wait_until(1065, LABEL_75)
	play_sound(SFX_FOOTSTEP_80D9, CHANNEL_CUTSCENE)

	wait_until(1085, LABEL_76)
	play_sound(SFX_FOOTSTEP_80DA, CHANNEL_CUTSCENE)

	wait_until(1200, LABEL_77)
	speak(CHR_BOND, L_LEE_044, MP3_048B, CHANNEL_CUTSCENE, COLOR_09_BLUE) // "Where are you going?"

	wait_until(1237, LABEL_78)
	play_sound(SFX_FOOTSTEP_80DB, CHANNEL_CUTSCENE)

	wait_until(1260, LABEL_79)
	play_sound(SFX_FOOTSTEP_80D8, CHANNEL_CUTSCENE)

	wait_until(1280, LABEL_7A)
	play_sound(SFX_FOOTSTEP_80D9, CHANNEL_CUTSCENE)

	wait_until(1300, LABEL_7B)
	play_sound(SFX_FOOTSTEP_80DA, CHANNEL_CUTSCENE)

	wait_until(1301, LABEL_62)
	speak(CHR_BOND, L_LEE_045, MP3_048C, CHANNEL_CUTSCENE, COLOR_04_ORANGE) // "We have to get down to the surface! Follow me!"
	open_door(OBJ_HANGARDOOR1)
	open_door(OBJ_HANGARDOOR2)
	open_door(OBJ_HANGARDOOR3)
	open_door(OBJ_HANGARDOOR4)
	set_object_flag(OBJ_HANGARDOOR1, OBJFLAG_DOOR_KEEPOPEN)
	set_object_flag(OBJ_HANGARDOOR2, OBJFLAG_DOOR_KEEPOPEN)
	set_object_flag(OBJ_HANGARDOOR3, OBJFLAG_DOOR_KEEPOPEN)
	set_object_flag(OBJ_HANGARDOOR4, OBJFLAG_DOOR_KEEPOPEN)

	beginloop(0x08)
		if_camera_animating(/*goto*/ 0x2c)
		goto_next(LABEL_B0)

		label(0x2c)
		if_controller_button_pressed(/*goto*/ LABEL_B0)
		label(0x2c)
	endloop(0x08)

	label(LABEL_B0)
	mute_channel(CHANNEL_CUTSCENE)
	end_level
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

#define init_skedar(function) \
	set_accuracy(VERSION >= VERSION_NTSC_1_0 ? 20 : 40) \
	set_reaction_speed(75) \
	set_chr_maxdamage(CHR_SELF, 10) \
	add_health_or_armor(190) \
	set_recovery_speed(0) \
	set_shield(0) \
	set_ailist(CHR_SELF, function)

u8 func041e_init_bridge1and2[] = {
	init_skedar(AILIST_BRIDGE_SKEDAR)
	endlist
};

u8 func0425_init_shy_skedar[] = {
	init_skedar(GAILIST_IDLE)
	endlist
};

u8 func0420_init_bridge3[] = {
	init_skedar(AILIST_BRIDGE_SKEDAR)
	endlist
};

/**
 * Assigned to the 3 Skedar on the bridge.
 */
u8 func0421_bridge_skedar[] = {
	set_shotlist(AILIST_BRIDGE_SKEDAR)
	if_chr_dead(CHR_SELF, /*goto*/ 0x06)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x06)
	goto_next(0x2c)

	// Dying
	label(0x06)
	set_shotlist(GAILIST_IDLE)
	restart_timer

	beginloop(0x53)
		if_timer_gt(15, /*goto*/ 0x06)
	endloop(0x53)

	label(0x06)
	say_quip(CHR_BOND, QUIP_DIE, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00)
	set_shotlist(GAILIST_IDLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Alive
	label(0x2c)
	if_just_injured(CHR_SELF, /*goto*/ 0x06)
	goto_next(0x08)

	// Injured
	label(0x06)
	set_view_distance(100)

	// Not injured
	label(0x08)
	set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
	label(LABEL_C6)
	if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x06)
	set_target_chr(CHR_BOND)
	try_attack_kneel(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ LABEL_C7)
	label(0x06)
	kneel

	beginloop(LABEL_C7)
		chr_toggle_p1p2(CHR_SELF)
		label(0x2c)
		set_target_chr(CHR_P1P2)
		if_target_outside_my_yvisang(/*goto*/ 0x06)
		if_can_see_target(/*goto*/ LABEL_C8)
		label(0x06)
		if_saw_injury(0x00, /*goto*/ LABEL_C8)
		if_near_miss(/*goto*/ LABEL_C9)
		label(0x2c)
		set_target_chr(CHR_P1P2)
		reloop(LABEL_C7)

		label(0x06)
		if_target_outside_my_yvisang(/*goto*/ 0x2c)
		if_can_see_target(/*goto*/ LABEL_C8)
		label(0x2c)
		set_target_chr(CHR_BOND)
	endloop(LABEL_C7)

	label(LABEL_C8)
	set_view_distance(100)
	if_self_flag_bankx_eq(CHRFLAG0_GP1, TRUE, BANK_0, /*goto*/ 0x2c)
	set_self_flag_bankx(CHRFLAG0_GP1, BANK_0)
	say_quip(CHR_BOND, QUIP_SEEPLAYER, 0xff, 0x02, 0xff, BANK_0, 0x00, 0x00)
	label(0x2c)
	goto_next(LABEL_CA)

	// Unreachable
	try_attack_amount(90, 100)

	// Reachable from below
	beginloop(LABEL_CB)
		if_chr_stopped(/*goto*/ LABEL_CC)
	endloop(LABEL_CB)

	label(LABEL_CC)
	restart_timer
	stop_chr

	beginloop(LABEL_B4)
		if_timer_gt(120, /*goto*/ 0x2c)
	endloop(LABEL_B4)

	label(0x2c)
	label(0x06)
	goto_first(LABEL_C6)

	// Near miss
	label(LABEL_C9)
	set_view_distance(100)
	restart_timer
	if_self_flag_bankx_eq(CHRFLAG0_GP1, TRUE, BANK_0, /*goto*/ LABEL_CD)
	set_self_flag_bankx(CHRFLAG0_GP1, BANK_0)

	label(LABEL_CD)
	call_rng
	chr_toggle_p1p2(CHR_SELF)
	set_target_chr(CHR_P1P2)
	if_target_outside_my_yvisang(/*goto*/ 0x06)
	if_can_see_target(/*goto*/ LABEL_CE)
	label(0x06)
	if_timer_gt(60, /*goto*/ LABEL_CF)
	if_rand_lt(4, /*goto*/ LABEL_CF)
	goto_first(LABEL_CD)

	label(LABEL_CF)
	if_los_to_target(/*goto*/ LABEL_CE)
	goto_first(LABEL_C6)

	label(LABEL_CE)
	goto_first(LABEL_C8)

	label(LABEL_D0)
	restart_timer

	beginloop(LABEL_D1)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_los_to_target(/*goto*/ LABEL_CE)
		if_timer_gt(300, /*goto*/ 0x06)
	endloop(LABEL_D1)

	label(0x06)
	goto_first(LABEL_C6)

	label(LABEL_CE)
	goto_first(LABEL_C8)

	label(LABEL_CA)
	if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, FALSE, BANK_0, /*goto*/ LABEL_60)
	try_attack_stand(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ LABEL_B1)
	label(LABEL_B1)
	say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00)
	try_modify_attack(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x06)
	goto_next(0x2c)

	label(LABEL_60)
	try_attack_amount(40, 60)
	dprint 'F','I','R','E',' ','F','U','L','L','\n',0,
	label(0x06)
	goto_first(LABEL_CB)

	label(0x2c)
	goto_first(LABEL_CC)

	endlist
};

u8 func1013_msg_gottogetshieldsdown[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_SAID_GETSHIELDSDOWN, TRUE, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	restart_timer

	beginloop(0x08)
		if_timer_gt(300, /*goto*/ 0x2c)
	endloop(0x08)

	label(0x2c)
	speak(CHR_BOND, L_LEE_027, MP3_03DC, CHANNEL_6, COLOR_09_BLUE) // "I've got to get those shields down to let Elvis in..."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1014_msg_hangarbaydoors[] = {
	if_difficulty_lt(DIFF_PA, /*goto*/ 0x09)
	restart_timer

	beginloop(0x04)
		if_objective_complete(0, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	restart_timer

	beginloop(0x08)
		if_timer_gt(240, /*goto*/ 0x2c)
	endloop(0x08)

	label(0x2c)
	speak(CHR_BOND, L_LEE_028, MP3_03DD, CHANNEL_6, COLOR_09_BLUE) // "Now only the hangar bay doors are in the way."

	label(0x09)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1015_msg_starmaps[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x003e, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	speak(CHR_P1P2, L_LEE_029, MP3_03DE, CHANNEL_6, COLOR_09_BLUE) // "This machine contains the Skedar star maps."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1016_msg_ifwecontrolthebridge[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x006f, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	set_stage_flag(STAGEFLAG_ENTERED_BRIDGELIFT)
	unset_chr_chrflag(CHR_BRIDGE1, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(CHR_BRIDGE2, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(CHR_BRIDGE3, CHRCFLAG_INVINCIBLE)
	speak(CHR_P1P2, L_LEE_030, MP3_03DF, CHANNEL_6, COLOR_09_BLUE) // "If we control the bridge, then the ship is ours."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0422_cass[] = {
	set_shotlist(GAILIST_IDLE)
	set_self_chrflag(CHRCFLAG_NEVERSLEEP)
	run_to_pad(PAD_LEE_01DD)

	beginloop(0x08)
		if_chr_distance_to_pad_lt(CHR_SELF, 300, PAD_LEE_01DD, /*goto*/ 0x06)
		if_chr_stopped(/*goto*/ 0x06)
	endloop(0x08)

	label(0x06)
	stop_chr
	set_stage_flag(STAGEFLAG_CASS_AT_PAD)

	// @bug: Looks like there's a missing goto_first 0x09 here.
	// With that statement, it would loop waiting for the Skedar to be ready.
	// As it stands, the check is pointless and Cass will do the screams and die
	// even if the Skedar is not ready.
	label(0x09)
	yield
	if_stage_flag_eq(STAGEFLAG_SHY_SKEDAR_READY, TRUE, /*goto*/ 0x2c)

	label(0x2c)
	play_sound(MP3_0486, CHANNEL_CUTSCENE)
	set_stage_flag(STAGEFLAG_CASS_SCREAMING)

	beginloop(LABEL_C2)
		damage_chr(CHR_SELF, WEAPON_SUPERDRAGON)
		if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c)
		if_chr_dead(CHR_SELF, /*goto*/ 0x2c)
		if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c)
	endloop(LABEL_C2)

	label(0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0423_shy_skedar[] = {
	set_shotlist(AILIST_INIT_SKEDAR)
	set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
	set_self_chrflag(CHRCFLAG_NEVERSLEEP)
	set_target_chr(CHR_CASS)
	goto_next(0x2c)

	if_self_flag_bankx_eq(CHRFLAG0_00008000, TRUE, BANK_0, /*goto*/ 0x03)
	label(LABEL_C2)
	chr_move_to_pad(CHR_SELF, PAD_LEE_00E0, TRUE, /*goto*/ 0x2c)

	// Warp failed or not available - so run
	label(0x03)
	set_target_chr(CHR_CASS)
	restart_timer
	try_run_to_target(/*goto*/ 0x08)

	beginloop(0x08)
		if_chr_stopped(/*goto*/ 0x06)
		if_chr_distance_to_pad_lt(CHR_SELF, 100, PAD_LEE_00DA, /*goto*/ 0x2d)
		if_timer_gt(60, /*goto*/ 0x06)
	endloop(0x08)

	// Stopped, or running for 1 second
	label(0x06)
	set_target_chr(CHR_CASS)
	goto_first(0x03)

	// Warped to pad 0x00e0 successfully - run rest of the way
	label(0x2c)
	run_to_pad(PAD_LEE_00DA)

	beginloop(0x09)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_can_see_target(/*goto*/ 0x2d)
		if_chr_distance_to_pad_lt(CHR_SELF, 200, PAD_LEE_00DA, /*goto*/ 0x2d)
		if_chr_stopped(/*goto*/ 0x2d)
	endloop(0x09)

	// At pad
	// The first time through this function, STAGEFLAG_SHY_SKEDAR_READY will
	// be set. The second time through this function, stageflag 02000000 will
	// be set.
	label(0x2d)
	if_stage_flag_eq(STAGEFLAG_SHY_SKEDAR_READY, TRUE, /*goto*/ 0x2c)
	set_stage_flag(STAGEFLAG_SHY_SKEDAR_READY)
	goto_next(0x2d)

	label(0x2c)
	set_stage_flag(STAGEFLAG_02000000)

	// Set target chr based on who it can see
	label(0x2d)
	stop_chr
	set_target_chr(CHR_BOND)
	if_los_to_target(/*goto*/ 0x2c)
	set_target_chr(CHR_COOP)
	if_los_to_target(/*goto*/ 0x2c)
	set_target_chr(CHR_ANTI)
	if_los_to_target(/*goto*/ 0x2c)

	label(0x2c)
	stop_chr
	set_shotlist(AILIST_INIT_SKEDAR)
	set_returnlist(CHR_SELF, AILIST_INIT_SKEDAR)
	set_ailist(CHR_SELF, AILIST_INIT_SKEDAR)
	endlist
};

u8 func0423_shy_skedar_wait[] = {
	set_shotlist(AILIST_SHY_SKEDAR)
	set_target_chr(CHR_CASS)
	set_self_flag_bankx(CHRFLAG0_00008000, BANK_0)
	restart_timer

	beginloop(0x08)
		if_timer_gt(180, /*goto*/ 0x2c)
	endloop(0x08)

	label(0x2c)
	set_ailist(CHR_SELF, AILIST_SHY_SKEDAR)
	endlist
};

u8 func141b_setup_lifts[] = {
	activate_lift(1, 0x25)
	activate_lift(2, 0x26)
	activate_lift(4, 0x28)
	activate_lift(5, 0x29)
	activate_lift(6, 0x2a)
	activate_lift(7, 0x2b)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * In PA room where the hangar door console is. Once console is activated, or
 * when hangar alarm is activated, the Skedar behind the door is alerted.
 */
u8 func1017_pa_skedar_alertness[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_HANGAR_DOORS_OPEN, TRUE, /*goto*/ 0x2c)
		if_stage_flag_eq(STAGEFLAG_HANGAR_ALARM_ACTIVATED, TRUE, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	restart_timer

	beginloop(0x08)
		if_timer_gt(300, /*goto*/ 0x2c)
	endloop(0x08)

	label(0x2c)
	set_ailist(0x02, GAILIST_ALERTED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1012_update_elvis_target_chr[] = {
	beginloop(0x04)
		if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x09)
		if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x08)
		goto_next(0x09)

		// Unreachable
		reloop(0x04)

		// Jo dead
		label(0x08)
		set_chr_target_chr(CHR_ELVIS, CHR_COOP)
		reloop(0x04)

		// Velvet dead or both alive
		label(0x09)
		set_chr_target_chr(CHR_ELVIS, CHR_BOND)
	endloop(0x04)

	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * Note Elvis is still hidden, hence why he doesn't appear until shields are
 * down.
 */
u8 func1018_place_elvis_in_hangar[] = {
	label(0x04)
	if_difficulty_lt(DIFF_PA, /*goto*/ 0x03)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// A and SA
	beginloop(0x03)
		chr_move_to_pad(CHR_ELVIS, PAD_LEE_0103, TRUE, /*goto*/ 0x2c)
	endloop(0x03)

	label(0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1002_hangar_shuttle[] = {
	yield
	enable_object(OBJ_HANGAR_SHUTTLE)
	set_object_flag3(OBJ_HANGAR_SHUTTLE, OBJFLAG3_00000010)
	object_set_modelpart_visible(OBJ_HANGAR_SHUTTLE, MODELPART_SKSHUTTLE_GANGWAY, FALSE)

	label(0x09)
	restart_timer

	beginloop(0x08)
		if_stage_flag_eq(STAGEFLAG_BRIDGE_CAPTURED, TRUE, /*goto*/ 0x06)
		if_objective_complete(4, /*goto*/ 0x06)
#if VERSION >= VERSION_NTSC_1_0
		object_do_animation(ANIM_045C, OBJ_HANGAR_SHUTTLE, 0x08, 0xffff)
#else
		object_do_animation(ANIM_045C, OBJ_HANGAR_SHUTTLE, 0x01, 0xffff)
#endif
	endloop(0x08)

	label(0x2c)
	goto_first(0x09)

	label(0x06)
	disable_object(OBJ_HANGAR_SHUTTLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101a_kill_maian[] = {
	yield
	damage_chr(CHR_MAIAN3, WEAPON_SUPERDRAGON)
	yield
	damage_chr(CHR_MAIAN3, WEAPON_SUPERDRAGON)
	yield
	damage_chr(CHR_MAIAN3, WEAPON_SUPERDRAGON)
	yield
	damage_chr(CHR_MAIAN3, WEAPON_SUPERDRAGON)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101c_lift_door_sounds[] = {
	beginloop(LABEL_C2)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_activated_object(CHR_P1P2, 0x2f, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x30, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x31, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x32, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x33, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x34, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x35, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x36, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x37, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x38, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x39, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x3a, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x3d, /*goto*/ 0x2c)
		if_chr_activated_object(CHR_P1P2, 0x3e, /*goto*/ 0x2c)
	endloop(LABEL_C2)

	label(0x2c)
	dprint 'S','O','U','N','D','\n',0,
	play_sound(SFX_81A6, -1)
	restart_timer

	beginloop(0x08)
		if_timer_gt(120, /*goto*/ 0x06)
	endloop(0x08)

	label(0x06)
	goto_first(LABEL_C2)

	endlist
};

u8 func101d_unlock_doors[] = {
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x2c)
	if_difficulty_lt(DIFF_PA, /*goto*/ 0x06)

	// PA - unlock door to console on other side of hangar
	unlock_door(0x35, 0x80)
	unlock_door(0x36, 0x80)

	// SA and PA - unlock door to engine room
	label(0x06)
	unlock_door(0x3f, 0x80)
	unlock_door(0x40, 0x80)

	// All difficulties
	label(0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101e_bridge_music[] = {
	beginloop(0x04)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_BOND, 0x00, 0x006e, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	play_x_track(XREASON_DEFAULT, 10, 60)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040c_elvis_run_from_engineroom[] = {
	set_shotlist(AILIST_ELVIS_RUN_FROM_ENGINEROOM)
	run_to_pad(PAD_LEE_005C)

	beginloop(0x08)
		if_chr_stopped(/*goto*/ 0x2c)
		if_stage_flag_eq(STAGEFLAG_ENGINES_DESTROYED, TRUE, /*goto*/ 0x2c)
	endloop(0x08)

	label(0x2c)
	set_ailist(CHR_SELF, AILIST_ELVIS_FOLLOW)
	endlist
};

u8 func101f_enable_bridge_skedar[] = {
	lock_door(0x41, 0x80)
	lock_door(0x42, 0x80)
	set_object_flag2(0x41, OBJFLAG2_LOCKEDBACK)
	set_object_flag2(0x42, OBJFLAG2_LOCKEDFRONT)
	set_object_flag2(0x41, OBJFLAG2_AICANNOTUSE)
	set_object_flag2(0x42, OBJFLAG2_AICANNOTUSE)

	// Wait until first 4 objectives complete
	beginloop(0x04)
		if_objective_complete(0, /*goto*/ 0x2c)
		reloop(0x04)

		label(0x2c)
		if_difficulty_lt(DIFF_PA, /*goto*/ 0x2c)
		if_objective_complete(1, /*goto*/ 0x2c)
		reloop(0x04)

		label(0x2c)
		if_objective_complete(2, /*goto*/ 0x2c)
		reloop(0x04)

		label(0x2c)
		if_difficulty_lt(DIFF_SA, /*goto*/ 0x2c)
		if_objective_complete(3, /*goto*/ 0x2c)
	reloop(0x04)

	label(0x2c)
	unlock_door(0x41, 0x80)
	unlock_door(0x42, 0x80)
	unset_object_flag2(0x41, OBJFLAG2_LOCKEDBACK)
	unset_object_flag2(0x42, OBJFLAG2_LOCKEDFRONT)
	unset_object_flag2(0x41, OBJFLAG2_AICANNOTUSE)
	unset_object_flag2(0x42, OBJFLAG2_AICANNOTUSE)
	enable_chr(0x21)
	enable_chr(0x22)
	enable_chr(CHR_BRIDGE1)
	enable_chr(CHR_BRIDGE2)
	enable_chr(CHR_BRIDGE3)
	enable_chr(CHR_BRIDGESPAWNER1)
	enable_chr(CHR_BRIDGESPAWNER2)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1020_engine_hum_noise[] = {
	yield
	assign_sound(SFX_81A5, CHANNEL_0)
	play_repeating_sound_from_object(CHANNEL_0, 0x1b, 1, 2000, 4000)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1021_check_ammo_wasted[] = {
	beginloop(0x04)
		if_stage_flag_eq(STAGEFLAG_SHIELDS_DISABLED, TRUE, /*goto*/ 0x0d)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_weapon_equipped(CHR_P1P2, WEAPON_MAULER, /*goto*/ LABEL_65)
	endloop(0x04)

	// Mauler equipped
	beginloop(LABEL_65)
		if_stage_flag_eq(STAGEFLAG_SHIELDS_DISABLED, TRUE, /*goto*/ 0x0d)
		if_ammo_quantity_lt(CHR_P1P2, AMMOTYPE_PISTOL, 1, /*goto*/ 0x2c)
	endloop(LABEL_65)

	// Ammo wasted
	label(0x2c)
	set_stage_flag(STAGEFLAG_AMMO_WASTED)
	show_hudmsg(CHR_BOND, L_LEE_049) // "Ammo depleted - consoles can't be destroyed."

	beginloop(LABEL_66)
		if_stage_flag_eq(STAGEFLAG_SHIELDS_DISABLED, TRUE, /*goto*/ 0x2c)
	endloop(LABEL_66)

	label(0x2c)
	unset_stage_flag(STAGEFLAG_AMMO_WASTED)

	// Shields disabled
	label(0x0d)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1022_setup_rtracker[] = {
	// @bug: The Slayer is not R-tracked
	yield
	set_object_flag3(OBJ_MAULER1, OBJFLAG3_RTRACKED_BLUE)
	set_object_flag3(OBJ_MAULER2, OBJFLAG3_RTRACKED_BLUE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040b_init_cass[] = {
	set_chr_maxdamage(CHR_SELF, 1)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1024_set_bridge_skedar_invincible[] = {
	set_chr_chrflag(CHR_BRIDGE1, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_BRIDGE2, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_BRIDGE3, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_BRIDGE1, CHRCFLAG_UNEXPLODABLE)
	set_chr_chrflag(CHR_BRIDGE2, CHRCFLAG_UNEXPLODABLE)
	set_chr_chrflag(CHR_BRIDGE3, CHRCFLAG_UNEXPLODABLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * Wait 10 seconds then set a flag on Joanna which enables buddy to warp to her.
 */
u8 unregistered_function1[] = {
	restart_timer

	beginloop(0x04)
		if_timer_gt(600, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1423_setup_environment[] = {
	yield
	configure_environment(0x0000, AIENVCMD_SETAMBIENT, TRUE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1025_toggle_chrs[] = {
	yield
	disable_chr(0x0b)
	disable_chr(0x0c)
	disable_chr(CHR_SUSPENDEDANIM1)
	disable_chr(CHR_SUSPENDEDANIM2)
	disable_chr(CHR_SUSPENDEDANIM3)
	disable_chr(CHR_SUSPENDEDANIM4)
	disable_chr(0x11)
	disable_chr(0x12)
	disable_chr(0x13)
	disable_chr(0x14)
	disable_chr(0x15)
	disable_chr(0x16)
	disable_chr(0x17)
	disable_chr(0x18)
	disable_chr(0x19)
	disable_chr(0x1a)
	disable_chr(0x1b)
	disable_chr(0x1c)
	disable_chr(0x1d)
	disable_chr(0x1e)
	disable_chr(0x1f)
	disable_chr(0x20)
	disable_chr(0x27)
	disable_chr(0x28)
	disable_chr(0x29)
	disable_chr(0x2a)
	disable_chr(0x2b)
	disable_chr(0x2c)
	disable_chr(0x21)
	disable_chr(0x22)
	disable_chr(CHR_BRIDGE1)
	disable_chr(CHR_BRIDGE2)
	disable_chr(CHR_BRIDGE3)
	disable_chr(CHR_BRIDGESPAWNER1)
	disable_chr(CHR_BRIDGESPAWNER2)

	beginloop(0x08)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_y(CHR_P1P2, 450, OPERATOR_LESS_THAN, /*goto*/ 0x2c)
		goto_next(0x06)

		label(0x2c)
	endloop(0x08)

	label(0x06)
	enable_chr(0x0b)
	yield
	enable_chr(0x0c)
	yield
	enable_chr(CHR_SUSPENDEDANIM1)
	yield
	enable_chr(CHR_SUSPENDEDANIM2)
	yield
	enable_chr(CHR_SUSPENDEDANIM3)
	yield
	enable_chr(CHR_SUSPENDEDANIM4)
	yield
	enable_chr(0x11)
	yield
	enable_chr(0x12)
	yield
	enable_chr(0x13)
	yield
	enable_chr(0x14)
	yield
	enable_chr(0x15)
	yield
	enable_chr(0x16)
	yield
	enable_chr(0x17)
	yield
	enable_chr(0x18)
	yield
	enable_chr(0x19)
	yield
	enable_chr(0x1a)
	yield
	enable_chr(0x1b)
	yield
	enable_chr(0x1c)
	yield
	enable_chr(0x1d)
	yield
	enable_chr(0x1e)
	yield
	enable_chr(0x1f)
	yield
	enable_chr(0x20)
	yield
	enable_chr(0x27)
	yield
	enable_chr(0x28)
	yield
	enable_chr(0x29)
	yield
	enable_chr(0x2a)
	yield
	enable_chr(0x2b)
	yield
	enable_chr(0x2c)
	yield
	set_ailist(CHR_MAIAN1, AILIST_CLOAK_AND_REMOVE)
	set_ailist(CHR_MAIAN2, AILIST_CLOAK_AND_REMOVE)
	set_ailist(0x07, AILIST_CLOAK_AND_REMOVE)
	set_ailist(0x08, AILIST_CLOAK_AND_REMOVE)
	set_ailist(0x09, AILIST_CLOAK_AND_REMOVE)
	set_ailist(0x0a, AILIST_CLOAK_AND_REMOVE)
	rebuild_teams
	rebuild_squadrons

	beginloop(0x09)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_y(CHR_P1P2, 550, OPERATOR_LESS_THAN, /*goto*/ 0x2c)
		goto_next(0x06)

		label(0x2c)
	endloop(0x09)

	label(0x06)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func041f_cloak_and_remove[] = {
	set_shotlist(AILIST_CLOAK_AND_REMOVE)
	set_chr_cloaked(CHR_SELF, TRUE, FALSE)
	restart_timer

	beginloop(0x04)
		if_timer_gt(120, /*goto*/ 0x2c)
	endloop(0x04)

	label(0x2c)
	remove_chr(CHR_SELF)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1026_hide_necklace[] = {
	yield
	if_difficulty_lt(DIFF_PA, /*goto*/ 0x2c)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// A and SA
	label(0x2c)
	disable_object(OBJ_NECKLACE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

#if VERSION >= VERSION_NTSC_1_0
u8 func0427_set_cloaked[] = {
	stop_chr
	set_chr_cloaked(CHR_SELF, TRUE, TRUE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0428_set_uncloaked[] = {
	stop_chr
	set_chr_cloaked(CHR_SELF, FALSE, TRUE)
	set_ailist(CHR_SELF, AILIST_ELVIS_FOLLOW)
	endlist
};
#endif

struct ailist ailists[] = {
	{ func1400_setup_counterop,                  0x1400 },
	{ func1001_objectives_failed_msg,            0x1001 },
	{ func1002_hangar_shuttle,                   0x1002 },
	{ func1003_intro,                            0x1003 },
	{ func1004_check_hangar_doors_opened,        0x1004 },
	{ func1005_check_elvis_dead,                 0x1005 },
	{ func1006_wake_slayer_skedar,               0x1006 },
	{ func1007_check_entered_slayer_area,        0x1007 },
	{ func1008_hangar_lifts,                     0x1008 },
	{ func1009_keep_door_open_in_intro,          0x1009 },
	{ func100a_check_hangar_kills_done,          0x100a },
	{ func100b_msg_getshieldsdown,               0x100b },
	{ func100c_engineroom,                       0x100c },
	{ func100d_prebridgelift,                    0x100d },
	{ func100e_bridgelift,                       0x100e },
	{ func100f_bridge_entry,                     0x100f },
	{ func1010_check_bridge_captured,            0x1010 },
	{ func1011_check_end_level,                  0x1011 },
	{ func1012_update_elvis_target_chr,          0x1012 },
	{ func1013_msg_gottogetshieldsdown,          0x1013 },
	{ func1014_msg_hangarbaydoors,               0x1014 },
	{ func1015_msg_starmaps,                     0x1015 },
	{ func1016_msg_ifwecontrolthebridge,         0x1016 },
	{ func1017_pa_skedar_alertness,              0x1017 },
	{ func1018_place_elvis_in_hangar,            0x1018 },
	{ func1002_hangar_shuttle,                   0x1019 },
	{ func1019_check_shields_lowered,            0x1019 },
	{ func101a_kill_maian,                       0x101a },
	{ func141b_setup_lifts,                      0x141b },
	{ func101c_lift_door_sounds,                 0x101c },
	{ func101d_unlock_doors,                     0x101d },
	{ func101e_bridge_music,                     0x101e },
	{ func101f_enable_bridge_skedar,             0x101f },
	{ func1020_engine_hum_noise,                 0x1020 },
	{ func1021_check_ammo_wasted,                0x1021 },
	{ func1022_setup_rtracker,                   0x1022 },
	{ func1423_setup_environment,                0x1423 },
	{ func1024_set_bridge_skedar_invincible,     0x1024 },
	{ func1025_toggle_chrs,                      0x1025 },
	{ func1026_hide_necklace,                    0x1026 },
	{ func1003_intro,                            0x0c00 },
	{ func0c01_outro,                            0x0c01 },
	{ func0c01_outro,                            0x0426 },
	{ func040f_init_skedar,                      0x040f },
	{ func0410_wake_suspendedanim_skedar,        0x0410 },
	{ func040d_elvis_wait_for_hangar_entry,      0x040d },
	{ func040e_elvis_give_ar34,                  0x040e },
	{ func0409_elvis_follow,                     0x0409 },
	{ func040a_elvis_go_to_hangar_lift,          0x040a },
	{ func040b_init_cass,                        0x040b },
	{ func040c_elvis_run_from_engineroom,        0x040c },
	{ func0401_start_path00,                     0x0401 },
	{ func0402_start_path01,                     0x0402 },
	{ func0403_start_path02,                     0x0403 },
	{ func0404_start_path03,                     0x0404 },
	{ func0405_start_path04,                     0x0405 },
	{ func0406_start_path05,                     0x0406 },
	{ func0407_init_knifeable_skedar,            0x0407 },
	{ func0408_knifeable_skedar,                 0x0408 },
	{ func0412_hangarspawner,                    0x0412 },
	{ func0413_init_hangarclone,                 0x0413 },
	{ func0414_hangarclone,                      0x0414 },
	{ func0415_bridgespawner,                    0x0415 },
	{ func0416_init_bridgeclone,                 0x0416 },
	{ func0417_init_spawner_reveal,              0x0417 },
	{ func0418_init_hangar_maian,                0x0418 },
	{ func0419_hangar_maian,                     0x0419 },
	{ func0415_bridgespawner,                    0x0415 },
	{ func0416_init_bridgeclone,                 0x0416 },
	{ func0417_init_spawner_reveal,              0x0417 },
	{ func041a_bridgeclone,                      0x041a },
	{ func041b_elvis_at_bridge,                  0x041b },
	{ func041c_elvis_outside_prebridgelift,      0x041c },
	{ func041d_init_elvis_outside_prebridgelift, 0x041d },
	{ func041f_cloak_and_remove,                 0x041f },
	{ func041e_init_bridge1and2,                 0x041e },
	{ func0420_init_bridge3,                     0x0420 },
	{ func0421_bridge_skedar,                    0x0421 },
	{ func0422_cass,                             0x0422 },
	{ func0423_shy_skedar,                       0x0423 },
	{ func0423_shy_skedar_wait,                  0x0424 },
	{ func0425_init_shy_skedar,                  0x0425 },
#if VERSION >= VERSION_NTSC_1_0
	{ func0427_set_cloaked,                      0x0427 },
	{ func0428_set_uncloaked,                    0x0428 },
#endif
	{ NULL, 0 },
};

struct path paths[] = {
	{ path00, 0, 0 },
	{ path01, 1, 0 },
	{ path02, 2, 0 },
	{ path03, 3, 0 },
	{ path04, 4, 0 },
	{ path05, 5, 0 },
	{ NULL, 0, 0 },
};
